diff options
| author | bakkeby <[email protected]> | 2019-10-24 08:03:00 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2019-10-24 11:03:39 +0200 |
| commit | d82be5a65d5e4546fd10fbd107dbf4dcc4dd7cd8 (patch) | |
| tree | 43cc3b63d34eedaa76924dbc2a9bb41653c6e9b6 | |
| parent | 4052783a63e1368a6f7595e61d41835e77cd7746 (diff) | |
| download | dwm-flexipatch-d82be5a65d5e4546fd10fbd107dbf4dcc4dd7cd8.tar.gz dwm-flexipatch-d82be5a65d5e4546fd10fbd107dbf4dcc4dd7cd8.zip | |
Adding nodmenu patch
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | config.def.h | 4 | ||||
| -rw-r--r-- | dwm.c | 2 | ||||
| -rw-r--r-- | patches.h | 6 |
4 files changed, 17 insertions, 1 deletions
@@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t ### Changelog: -2019-10-24 - Added dragmfact and extrabar patches +2019-10-24 - Added dragmfact, extrabar and nodmenu patches 2019-10-22 - Added ispermanent and swallow patches @@ -202,6 +202,10 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t - [noborder](https://dwm.suckless.org/patches/noborder/) - removes the border when there is only one window visible + - [nodmenu](https://dwm.suckless.org/patches/nodmenu/) + - enable modifying dmenu in config.def.h which resulted previously in a compilation error because two lines of code hardcode dmenu into dwm + - allows complete removal of dmenu, should you want to do that + - [onlyquitonempty](https://dwm.suckless.org/patches/onlyquitonempty/) - makes it so dwm will only exit via quit() if no windows are open (in order to prevent accidental loss of work) diff --git a/config.def.h b/config.def.h index 73c0164..9aeee95 100644 --- a/config.def.h +++ b/config.def.h @@ -488,8 +488,12 @@ static const Layout layouts[] = { #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ +#if NODMENU_PATCH +static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; +#else static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; +#endif static const char *termcmd[] = { "st", NULL }; #if SCRATCHPAD_PATCH @@ -2929,8 +2929,10 @@ sigchld(int unused) void spawn(const Arg *arg) { + #if !NODMENU_PATCH if (arg->v == dmenucmd) dmenumon[0] = '0' + selmon->num; + #endif // NODMENU_PATCH #if SCRATCHPAD_PATCH selmon->tagset[selmon->seltags] &= ~scratchtag; #endif // SCRATCHPAD_PATCH @@ -282,6 +282,12 @@ */ #define NOBORDER_PATCH 0 +/* Enable modifying or removing dmenu in config.def.h which resulted previously in a + * compilation error because two lines of code hardcode dmenu into dwm. + * https://dwm.suckless.org/patches/nodmenu/ + */ +#define NODMENU_PATCH 0 + /* This patch makes it so dwm will only exit via quit() if no windows are open. * This is to prevent you accidentally losing all your work. * https://dwm.suckless.org/patches/onlyquitonempty/ |
