dwm
dynamic window manager
git clone https://9o.is/git/dwm.git
commit 6cb076bb1f8ac08cae863af2fa10fc99ab1fd256 parent eefb0cb72b715a34aad0612724f426d996032537 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 28 Oct 2022 16:37:56 +0200 Revert "Remove dmenumon variable" This reverts commit 4a0e6aed056c1d76d36af1f29713864ec00fcf6f. Revert back this change. It seems to not be an edge-case anymore since multiple users have asked about this new behaviour now. Diffstat:
| M | config.def.h | | | 3 | ++- |
| M | dwm.c | | | 2 | ++ |
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/config.def.h b/config.def.h @@ -56,7 +56,8 @@ static const Layout layouts[] = { #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; +static char dmenumon[2] = "0"; /* 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 }; static const Key keys[] = { diff --git a/dwm.c b/dwm.c @@ -1639,6 +1639,8 @@ sigchld(int unused) void spawn(const Arg *arg) { + if (arg->v == dmenucmd) + dmenumon[0] = '0' + selmon->num; if (fork() == 0) { if (dpy) close(ConnectionNumber(dpy));