Adding nodmenu patch

pull/32/head
bakkeby 5 years ago
parent 4052783a63
commit d82be5a65d

@ -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)

@ -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/

Loading…
Cancel
Save