diff options
| author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2026-10-13 15:00:21 +0200 |
|---|---|---|
| committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2026-10-16 13:26:00 +0200 |
| commit | bca7cf2bd91760855408326411a659ff72895860 (patch) | |
| tree | 9a3649a2319cf80ff2f0ae3cd9c14274dcdfc427 | |
| parent | 1d07715ebdf41f293b8de0c027932e71d8360a36 (diff) | |
support spawning dmenu with more than 10 monitors
| -rw-r--r-- | config.def.h | 2 | ||||
| -rw-r--r-- | dwm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index 81c3fc0..cb4cf6b 100644 --- a/config.def.h +++ b/config.def.h @@ -57,7 +57,7 @@ static const Layout layouts[] = { #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ +static char dmenumon[8]; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; @@ -1657,7 +1657,7 @@ spawn(const Arg *arg) pid_t pid; if (arg->v == dmenucmd) - dmenumon[0] = '0' + selmon->num; + snprintf(dmenumon, sizeof(dmenumon), "%d", selmon->num); if ((pid = fork()) == -1) { fprintf(stderr, "dwm: fork failed: %s\n", strerror(errno)); |
