dwm-nodmenu-6.2.diff (1550B)
1 From a77edbf57712195189d07b2fdce661fce80e3b94 Mon Sep 17 00:00:00 2001 2 From: aleks <aleks.stier@icloud.com> 3 Date: Sun, 11 Aug 2019 02:54:49 +0200 4 Subject: [PATCH] Remove hardcoded dmenu-integration 5 6 Enable modifying dmenu in config.def.h which resulted previously in a 7 compilation error because two lines of code hardcode dmenu into dwm. 8 This includes: 9 10 - removing dmenumon-variable 11 - renaming dmenucmd-variable 12 - removing dmenu completly 13 --- 14 config.def.h | 3 +-- 15 dwm.c | 2 -- 16 2 files changed, 1 insertion(+), 4 deletions(-) 17 18 diff --git a/config.def.h b/config.def.h 19 index 1c0b587..da4b71d 100644 20 --- a/config.def.h 21 +++ b/config.def.h 22 @@ -55,8 +55,7 @@ static const Layout layouts[] = { 23 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 24 25 /* commands */ 26 -static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 27 -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 28 +static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 29 static const char *termcmd[] = { "st", NULL }; 30 31 static Key keys[] = { 32 diff --git a/dwm.c b/dwm.c 33 index 4465af1..b9e14c0 100644 34 --- a/dwm.c 35 +++ b/dwm.c 36 @@ -1639,8 +1639,6 @@ sigchld(int unused) 37 void 38 spawn(const Arg *arg) 39 { 40 - if (arg->v == dmenucmd) 41 - dmenumon[0] = '0' + selmon->num; 42 if (fork() == 0) { 43 if (dpy) 44 close(ConnectionNumber(dpy)); 45 -- 46 2.22.0 47