commit 664b424d78a60b0ad61095aa748dca623bb3af62
parent 971350095e00bf1222da5e80c57dd297d7ab19cc
Author: Jakub Skowron <jakubskowron676@gmail.com>
Date: Tue, 24 Jun 2025 15:21:21 +0200
Add unfocusednoborders page to patches
Diffstat:
2 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/dwm.suckless.org/patches/unfocusednoborders/dwm-unfocusednoborders-6.5.diff b/dwm.suckless.org/patches/unfocusednoborders/dwm-unfocusednoborders-6.5.diff
@@ -0,0 +1,42 @@
+From 6800ba5aa83502012f6a51a00534edacaee7820f Mon Sep 17 00:00:00 2001
+From: Jakub Skowron <jakubskowron676@gmail.com>
+Date: Tue, 24 Jun 2025 14:46:46 +0200
+Subject: [PATCH] remove borders on unfocused windows
+
+This patch completely removes borders on all windows that are not
+focused and adds them back in once they are (e.g. once hovered over).
+---
+ dwm.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/dwm.c b/dwm.c
+index 1443802..7b2bc88 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -800,7 +800,11 @@ focus(Client *c)
+ detachstack(c);
+ attachstack(c);
+ grabbuttons(c, 1);
++
++ c->bw = borderpx;
+ XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
++ arrange(c->mon);
++
+ setfocus(c);
+ } else {
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+@@ -1767,7 +1771,10 @@ unfocus(Client *c, int setfocus)
+ if (!c)
+ return;
+ grabbuttons(c, 0);
+- XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel);
++
++ c->bw = 0;
++ arrange(c->mon);
++
+ if (setfocus) {
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+ XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
+--
+2.50.0
+
diff --git a/dwm.suckless.org/patches/unfocusednoborders/index.md b/dwm.suckless.org/patches/unfocusednoborders/index.md
@@ -0,0 +1,17 @@
+unfocusednoborders
+==================
+
+Description
+-----------
+This patch removes borders from all windows that are not focused and adds
+them back in once they are (e.g. once hovered over).
+
+The patch has been tested and is confirmed to work on dwm version 6.4.
+
+Download
+--------
+* [dwm-unfocusednoborders-6.5.diff](dwm-unfocusednoborders-6.5.diff) (1.2K) (20250624)
+
+Author
+------
+* Jakub Skowron - <jakubskowron676@gmail.com>