From 1708315aaf8df863e197d079a661d05406dff2b2 Mon Sep 17 00:00:00 2001 From: MrGeorgen Date: Sun, 16 Aug 2020 18:19:17 +0200 Subject: [PATCH] fixed dmenu to j4-dmenu-desktop cmd converter --- config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'; }