mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 17:54:17 +00:00
riverctl patch: add support for changing borderpx via dwlctl
This commit is contained in:
parent
eadf4ec650
commit
749f80e565
@ -1,4 +1,4 @@
|
||||
From fbaf5f3b5d57c9239ed822d307f7f0b71aa53b27 Mon Sep 17 00:00:00 2001
|
||||
From ef417a18fea99dedc9dfe33f86015d6881c0751d Mon Sep 17 00:00:00 2001
|
||||
From: Zuki Air <zukirust@gmail.com>
|
||||
Date: Sun, 27 Jul 2025 11:30:32 +0100
|
||||
Subject: [PATCH] river-ctl patch
|
||||
@ -13,8 +13,8 @@ improve uint error handling
|
||||
dwl.c | 20 +-
|
||||
dwlctl.c | 132 +++++
|
||||
protocols/river-control-unstable-v1.xml | 85 +++
|
||||
river-control.h | 722 ++++++++++++++++++++++++
|
||||
7 files changed, 1001 insertions(+), 15 deletions(-)
|
||||
river-control.h | 732 ++++++++++++++++++++++++
|
||||
7 files changed, 1011 insertions(+), 15 deletions(-)
|
||||
create mode 100644 dwlctl.c
|
||||
create mode 100644 protocols/river-control-unstable-v1.xml
|
||||
create mode 100644 river-control.h
|
||||
@ -439,10 +439,10 @@ index 0000000..aa5fc4d
|
||||
+</protocol>
|
||||
diff --git a/river-control.h b/river-control.h
|
||||
new file mode 100644
|
||||
index 0000000..237a926
|
||||
index 0000000..9583607
|
||||
--- /dev/null
|
||||
+++ b/river-control.h
|
||||
@@ -0,0 +1,722 @@
|
||||
@@ -0,0 +1,732 @@
|
||||
+#include "river-control-unstable-v1-private-protocol.c"
|
||||
+#include "river-control-unstable-v1-protocol.h"
|
||||
+#ifdef KEYS_USED
|
||||
@ -450,6 +450,7 @@ index 0000000..237a926
|
||||
+#endif
|
||||
+void clear_rules(const Arg*);
|
||||
+void clear_binds(const Arg*);
|
||||
+void setborderpx(const Arg*);
|
||||
+// TODO add dynamic rules then its fully complete!
|
||||
+struct wl_list arg_str_store;
|
||||
+struct wl_list rule_str_store;
|
||||
@ -496,6 +497,7 @@ index 0000000..237a926
|
||||
+struct Func_str_type_pair Func_str_type_pair_list[] = {
|
||||
+ { clear_binds, FUNC_STR_ARG_TYPE_NONE, "clear-binds" },
|
||||
+ { clear_rules, FUNC_STR_ARG_TYPE_NONE, "clear-rules" },
|
||||
+ STR(setborderpx,FUNC_STR_ARG_TYPE_UINT),
|
||||
+ STR(setlayout,FUNC_STR_ARG_TYPE_LAYOUT),
|
||||
+ STR(spawn,FUNC_STR_ARG_TYPE_STRING_ARRAY),
|
||||
+ STR(focusstack,FUNC_STR_ARG_TYPE_INT),
|
||||
@ -659,6 +661,14 @@ index 0000000..237a926
|
||||
+ const char* error_msg;
|
||||
+};
|
||||
+
|
||||
+void setborderpx(const Arg *arg) {
|
||||
+ Client *c;
|
||||
+ borderpx = arg->ui;
|
||||
+ wl_list_for_each(c, &clients, link) {
|
||||
+ c->bw = borderpx;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void zriver_control_destroy(struct wl_client *client,
|
||||
+ struct wl_resource *resource) {
|
||||
+ printf("destroy!\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user