commit 5ab99585b7a32dceb152361af4be6bfb68a8d064
parent bca60999b5474ffe97b58475b7c9b8283309ca9e
Author: Jacob R. Edwards <n/a>
Date: Mon, 7 Feb 2022 16:21:59 -0800
Patch dwm to allow disabling monocle label override
Diffstat:
1 file changed, 50 insertions(+), 0 deletions(-)
diff --git a/local/src/src/fork/dwm/patches/monocount-option.diff b/local/src/src/fork/dwm/patches/monocount-option.diff
@@ -0,0 +1,50 @@
+Author: Jacob R. Edwards
+Date: 2022-02-07
+
+Add the option to turn off the monocle layout's label override.
+
+diff -up dwm-6.3.orig/config.def.h dwm-6.3/config.def.h
+--- dwm-6.3.orig/config.def.h Mon Feb 7 15:54:31 2022
++++ dwm-6.3/config.def.h Mon Feb 7 16:00:35 2022
+@@ -36,6 +36,7 @@ static const float mfact = 0.55; /* factor of mast
+ static const int nmaster = 1; /* number of clients in master area */
+ static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
+ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
++static const int monocount = 1; /* 1 will override the monocle label with number of clients */
+
+ static const Layout layouts[] = {
+ /* symbol arrange function */
+diff -up dwm-6.3.orig/config.h dwm-6.3/config.h
+--- config.h.orig Mon Feb 7 16:10:11 2022
++++ config.h Mon Feb 7 16:10:39 2022
+@@ -38,6 +38,7 @@ static const int resizehints = 0; /* 1 means respect s
+ static const float mfact = 0.6; /* factor of master area size [0.05..0.95] */
+ static const int nmaster = 1; /* number of clients in master area */
+ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
++static const int monocount = 1; /* 1 will override the monocle label with number of clients */
+
+ static const Layout layouts[] = {
+ /* symbol, arrange function */
+
+diff -up dwm-6.3.orig/dwm.c dwm-6.3/dwm.c
+--- dwm-6.3.orig/dwm.c Mon Feb 7 15:54:31 2022
++++ dwm-6.3/dwm.c Mon Feb 7 15:59:21 2022
+@@ -1110,11 +1110,13 @@ monocle(Monitor *m)
+ unsigned int n = 0;
+ Client *c;
+
+- for (c = m->clients; c; c = c->next)
+- if (ISVISIBLE(c))
+- n++;
+- if (n > 0) /* override layout symbol */
+- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
++ if (monocount) {
++ for (c = m->clients; c; c = c->next)
++ if (ISVISIBLE(c))
++ n++;
++ if (n > 0) /* override layout symbol */
++ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
++ }
+ for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
+ }