Add unfocusednoborders page to patches - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 664b424d78a60b0ad61095aa748dca623bb3af62
 (DIR) parent 971350095e00bf1222da5e80c57dd297d7ab19cc
 (HTM) Author: Jakub Skowron <jakubskowron676@gmail.com>
       Date:   Tue, 24 Jun 2025 15:21:21 +0200
       
       Add unfocusednoborders page to patches
       
       Diffstat:
         A dwm.suckless.org/patches/unfocused… |      42 +++++++++++++++++++++++++++++++
         A dwm.suckless.org/patches/unfocused… |      17 +++++++++++++++++
       
       2 files changed, 59 insertions(+), 0 deletions(-)
       ---
 (DIR) 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
       +
 (DIR) 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>