fixed dmenu to j4-dmenu-desktop cmd converter

This commit is contained in:
2020-08-16 18:19:17 +02:00
parent d311cd0980
commit 1708315aaf

View File

@ -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';
}