diff --git a/config.h b/config.h index b87ec96..575659b 100644 --- a/config.h +++ b/config.h @@ -57,7 +57,7 @@ static const Layout layouts[] = { /* commands */ 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 char dmenucmdstr[256]; +static char dmenucmdstr[256] = "--dmenu=\""; static const char *j4_dmenu_desktopcmd[] = {"j4-dmenu-desktop", dmenucmdstr, NULL}; static const char *termcmd[] = { "st", NULL }; static const char *firefoxcmd[] = {"firefox", NULL}; @@ -122,9 +122,10 @@ static Button buttons[] = { { ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; - void config_start() { for (unsigned i = 0; dmenucmd[i] != NULL; ++i) { strcat(dmenucmdstr, dmenucmd[i]); + strcat(dmenucmdstr, "\" \""); } + dmenucmdstr[strlen(dmenucmdstr) - 2] = '\0'; }