summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2019-09-14 23:28:04 +0200
committerbakkeby <[email protected]>2019-09-14 23:28:04 +0200
commit5501f81b9cbc154a2e85fc82cc9eac913b49d8d8 (patch)
treede4beaf1f1c9ed0b2f10c4a49d3b92086d86b10a /patch
parent39e161e54519c8c28d479d69f5a1be88b59e3dac (diff)
downloaddwm-flexipatch-5501f81b9cbc154a2e85fc82cc9eac913b49d8d8.tar.gz
dwm-flexipatch-5501f81b9cbc154a2e85fc82cc9eac913b49d8d8.zip
Adding setborderpx patch
Diffstat (limited to 'patch')
-rw-r--r--patch/include.c4
-rw-r--r--patch/include.h4
-rw-r--r--patch/setborderpx.c20
-rw-r--r--patch/setborderpx.h1
4 files changed, 29 insertions, 0 deletions
diff --git a/patch/include.c b/patch/include.c
index 982fcfe..61ac167 100644
--- a/patch/include.c
+++ b/patch/include.c
@@ -48,6 +48,10 @@
#include "rotatestack.c"
#endif
+#if SETBORDERPX_PATCH
+#include "setborderpx.c"
+#endif
+
#if SYSTRAY_PATCH
#include "systray.c"
#endif
diff --git a/patch/include.h b/patch/include.h
index ae948cd..fb427cf 100644
--- a/patch/include.h
+++ b/patch/include.h
@@ -44,6 +44,10 @@
#include "rotatestack.h"
#endif
+#if SETBORDERPX_PATCH
+#include "setborderpx.h"
+#endif
+
#if SYSTRAY_PATCH
#include "systray.h"
#endif
diff --git a/patch/setborderpx.c b/patch/setborderpx.c
new file mode 100644
index 0000000..76bf726
--- /dev/null
+++ b/patch/setborderpx.c
@@ -0,0 +1,20 @@
+void
+setborderpx(const Arg *arg)
+{
+ Client *c;
+
+ if (arg->i == 0)
+ mons->borderpx = borderpx;
+ else if (mons->borderpx + arg->i < 0)
+ mons->borderpx = 0;
+ else
+ mons->borderpx += arg->i;
+
+ for (c = mons->clients; c; c = c->next)
+ if (c->bw + arg->i < 0)
+ c->bw = mons->borderpx = 0;
+ else
+ c->bw = mons->borderpx;
+
+ arrange(selmon);
+} \ No newline at end of file
diff --git a/patch/setborderpx.h b/patch/setborderpx.h
new file mode 100644
index 0000000..c598066
--- /dev/null
+++ b/patch/setborderpx.h
@@ -0,0 +1 @@
+static void setborderpx(const Arg *arg); \ No newline at end of file