summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2019-10-04 23:39:01 +0200
committerbakkeby <[email protected]>2019-10-04 23:39:01 +0200
commit69c6037b26d7adb4cf2a2f50111fbdf58d15e4e8 (patch)
treeff600596d4f055134811caf0c8af5a50df0da051
parente0a21f0869904eb819e559a14f46820279b993cc (diff)
downloaddwm-flexipatch-69c6037b26d7adb4cf2a2f50111fbdf58d15e4e8.tar.gz
dwm-flexipatch-69c6037b26d7adb4cf2a2f50111fbdf58d15e4e8.zip
Adding noborder patch
-rw-r--r--README.md5
-rw-r--r--dwm.c9
-rw-r--r--patches.h5
3 files changed, 18 insertions, 1 deletions
diff --git a/README.md b/README.md
index c336ef4..2e0772c 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
-2019-10-04 - Added maximize, movestack and monoclesymbol patches
+2019-10-04 - Added maximize, movestack, monoclesymbol, noborder patches
2019-10-03 - Added onlyquitonempty and switchcol patches
@@ -149,6 +149,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [movestack](https://dwm.suckless.org/patches/movestack/)
- allows you to move clients around in the stack and swap them with the master
+ - [noborder](https://dwm.suckless.org/patches/noborder/)
+ - removes the border when there is only one window visible
+
- [onlyquitonempty](https://dwm.suckless.org/patches/onlyquitonempty/)
- makes it so dwm will only exit via quit() if no windows are open (in order to prevent accidental loss of work)
diff --git a/dwm.c b/dwm.c
index 6efac2e..343fa93 100644
--- a/dwm.c
+++ b/dwm.c
@@ -2042,6 +2042,15 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw;
+ #if NOBORDER_PATCH
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
+ && !c->isfullscreen && !c->isfloating) {
+ c->w = wc.width += c->bw * 2;
+ c->h = wc.height += c->bw * 2;
+ wc.border_width = 0;
+ }
+ #endif // NOBORDER_PATCH
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);
diff --git a/patches.h b/patches.h
index 026e38d..6ccee1e 100644
--- a/patches.h
+++ b/patches.h
@@ -214,6 +214,11 @@
*/
#define MOVESTACK_PATCH 0
+/* Removes the border when there is only one window visible.
+ * https://dwm.suckless.org/patches/noborder/
+ */
+#define NOBORDER_PATCH 0
+
/* This patch makes it so dwm will only exit via quit() if no windows are open.
* This is to prevent you accidentally losing all your work.
* https://dwm.suckless.org/patches/onlyquitonempty/