support spawning dmenu with more than 10 monitors
This commit is contained in:
1 parent
1d07715ebd
commit
bca7cf2bd9
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -57,7 +57,7 @@ static const Layout layouts[] = {
|
|||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
/* commands */
|
/* 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 *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 char *termcmd[] = { "st", NULL };
|
||||||
|
|
||||||
|
|||||||
@@ -1657,7 +1657,7 @@ spawn(const Arg *arg)
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
if (arg->v == dmenucmd)
|
if (arg->v == dmenucmd)
|
||||||
dmenumon[0] = '0' + selmon->num;
|
snprintf(dmenumon, sizeof(dmenumon), "%d", selmon->num);
|
||||||
|
|
||||||
if ((pid = fork()) == -1) {
|
if ((pid = fork()) == -1) {
|
||||||
fprintf(stderr, "dwm: fork failed: %s\n", strerror(errno));
|
fprintf(stderr, "dwm: fork failed: %s\n", strerror(errno));
|
||||||
|
|||||||
Reference in new issue
Block a user