Revert "Remove dmenumon variable" ba56fe9f
This reverts commit c2b748e7931e5f28984efc236f9b1a212dbc65e8.

Revert back this change. It seems to not be an edge-case anymore since
multiple users have asked about this new behaviour now.
Hiltjo Posthuma · 2022-10-28 16:37 2 file(s) · +4 −1
config.def.h +2 −1
56 56
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
57 57
58 58
/* commands */
59 -
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
59 +
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
60 +
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
60 61
static const char *termcmd[]  = { "st", NULL };
61 62
62 63
static const Key keys[] = {
dwm.c +2 −0
1639 1639
void
1640 1640
spawn(const Arg *arg)
1641 1641
{
1642 +
	if (arg->v == dmenucmd)
1643 +
		dmenumon[0] = '0' + selmon->num;
1642 1644
	if (fork() == 0) {
1643 1645
		if (dpy)
1644 1646
			close(ConnectionNumber(dpy));