sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 0b4066a49b0deb2e8c270ddbe35946e6d163e8bc
parent 94179be8705998ab15098ecc3588f9ab335f2f67
Author: ben evolver <>
Date:   Sun, 17 Apr 2022 08:45:34 -0500

[dwm][patch][clientmonoclesymbol] added patch

Diffstat:
Adwm.suckless.org/patches/clientmonoclesymbol/clientmonoclesymbol.gif | 0
Adwm.suckless.org/patches/clientmonoclesymbol/dwm-clientmonoclesymbol-20220417-d93ff48.diff | 41+++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/clientmonoclesymbol/index.md | 16++++++++++++++++
3 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/clientmonoclesymbol/clientmonoclesymbol.gif b/dwm.suckless.org/patches/clientmonoclesymbol/clientmonoclesymbol.gif Binary files 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 @@ -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 +@@ -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 +@@ -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 @@ -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