[wiki] [sites] [dwm][patch][clientmonoclesymbol] added patch || ben evolver
commit 0b4066a49b0deb2e8c270ddbe35946e6d163e8bc
Author: ben evolver <>
Date: Sun Apr 17 08:45:34 2022 -0500
[dwm][patch][clientmonoclesymbol] added patch
diff --git a/dwm.suckless.org/patches/clientmonoclesymbol/clientmonoclesymbol.gif b/dwm.suckless.org/patches/clientmonoclesymbol/clientmonoclesymbol.gif
new file mode 100755
index 00000000..21648e68
Binary files /dev/null and b/dwm.suckless.org/patches/clientmonoclesymbol/clientmonoclesymbol.gif differ
diff --git a/dwm.suckless.org/patches/clientmonoclesymbol/dwm-clientmonoclesymbol-20220417-d93ff48.diff b/dwm.suckless.org/patches/clientmonoclesymbol/dwm-clientmonoclesymbol-20220417-d93ff48.diff
new file mode 100644
index 00000000..082461ec
--- /dev/null
+++ b/dwm.suckless.org/patches/clientmonoclesymbol/dwm-clientmonoclesymbol-20220417-d93ff48.diff
_AT_@ -0,0 +1,41 @@
+From 630859138bb960e2aea41d47e68c48ec020daf5c Mon Sep 17 00:00:00 2001
+From: ben evolver <>
+Date: Sun, 17 Apr 2022 08:07:24 -0500
+Subject: [PATCH] add alternative symbols for nr. of active clients in monocle layout
+
+---
+ config.def.h | 4 ++++
+ dwm.c | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/config.def.h b/config.def.h
+index a2ac963..f49dfdf 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -44,6 +44,10 @@ static const Layout layouts[] = {
+ { "[M]", monocle },
+ };
+
++/* custom symbols for nr. of clients in monocle layout */
++/* when clients >= LENGTH(monocles), uses the last element */
++static const char *monocles[] = { "[1]", "[2]", "[3]", "[4]", "[5]", "[6]", "[7]", "[8]", "[9]", "[9+]" };
++
+ /* key definitions */
+ #define MODKEY Mod1Mask
+ #define TAGKEYS(KEY,TAG) \
+diff --git a/dwm.c b/dwm.c
+index 0fc328a..e47ba70 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -1116,7 +1116,7 @@ monocle(Monitor *m)
+ if (ISVISIBLE(c))
+ n++;
+ if (n > 0) /* override layout symbol */
+- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
++ snprintf(m->ltsymbol, sizeof m->ltsymbol, "%s", monocles[MIN(n, LENGTH(monocles)) - 1]);
+ 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);
+ }
+--
+2.35.1
+
diff --git a/dwm.suckless.org/patches/clientmonoclesymbol/index.md b/dwm.suckless.org/patches/clientmonoclesymbol/index.md
new file mode 100644
index 00000000..8981fd9c
--- /dev/null
+++ b/dwm.suckless.org/patches/clientmonoclesymbol/index.md
_AT_@ -0,0 +1,16 @@
+client monocle symbol
+=====================
+
+Description
+-----------
+Add alternative symbols for nr. of active clients in monocle layout. Intended for use with e.g. Nerd Fonts
+
+![Screenshot](clientmonoclesymbol.gif)
+
+Download
+--------
+* [dwm-clientmonoclesymbol-20220417-d93ff48.diff](dwm-clientmonoclesymbol-20220417-d93ff48.diff)
+
+Authors
+-------
+* ben evolver
Received on Sun Apr 17 2022 - 15:46:45 CEST
This archive was generated by hypermail 2.3.0
: Sun Apr 17 2022 - 15:48:48 CEST