Adding dmenumatchtop patch

This commit is contained in:
bakkeby 2019-11-26 19:54:00 +01:00
parent 3b175a5387
commit 7d107ce8eb
3 changed files with 29 additions and 5 deletions

View File

@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog: ### Changelog:
2019-11-26 - Added dmenumatchtop patch
2019-11-21 - Added fakefullscreenclient patch 2019-11-21 - Added fakefullscreenclient patch
2019-10-24 - Added dragmfact, extrabar, exresize and nodmenu patches 2019-10-24 - Added dragmfact, extrabar, exresize and nodmenu patches
@ -117,6 +119,10 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [cyclelayouts](https://dwm.suckless.org/patches/cyclelayouts/) - [cyclelayouts](https://dwm.suckless.org/patches/cyclelayouts/)
- lets you cycle through all your layouts - lets you cycle through all your layouts
- [dmenumatchtop](https://dwm.suckless.org/patches/dmenumatchtop)
- updates the position of dmenu to match that of the bar
- i.e. if topbar is 0 then dmenu will appear at the bottom and if 1 then dmenu will appear at the top
- [dragmfact](https://dwm.suckless.org/patches/dragmfact/) - [dragmfact](https://dwm.suckless.org/patches/dragmfact/)
- lets you resize the split in the tile layout (i.e. modify mfact) by holding the modkey and dragging the mouse - lets you resize the split in the tile layout (i.e. modify mfact) by holding the modkey and dragging the mouse

View File

@ -488,12 +488,24 @@ static const Layout layouts[] = {
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */ /* commands */
#if NODMENU_PATCH #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 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 // NODMENU_PATCH
#endif static const char *dmenucmd[] = {
"dmenu_run",
#if !NODMENU_PATCH
"-m", dmenumon,
#endif // NODMENU_PATCH
"-fn", dmenufont,
"-nb", normbgcolor,
"-nf", normfgcolor,
"-sb", selbgcolor,
"-sf", selfgcolor,
#if DMENUMATCHTOP_PATCH
topbar ? NULL : "-b",
#endif // DMENUMATCHTOP_PATCH
NULL
};
static const char *termcmd[] = { "st", NULL }; static const char *termcmd[] = { "st", NULL };
#if SCRATCHPAD_PATCH #if SCRATCHPAD_PATCH

View File

@ -115,6 +115,12 @@
*/ */
#define CYCLELAYOUTS_PATCH 0 #define CYCLELAYOUTS_PATCH 0
/* Updates the position of dmenu to match that of the bar. I.e. if topbar is 0 then dmenu
* will appear at the bottom and if 1 then dmenu will appear at the top.
* https://dwm.suckless.org/patches/dmenumatchtop
*/
#define DMENUMATCHTOP_PATCH 0
/* This patch lets you resize the split in the tile layout (i.e. modify mfact) by holding /* This patch lets you resize the split in the tile layout (i.e. modify mfact) by holding
* the modkey and dragging the mouse. * the modkey and dragging the mouse.
* This patch can be a bit wonky with other layouts, but generally works. * This patch can be a bit wonky with other layouts, but generally works.