diff options
author | Malfurious <m@lfurio.us> | 2024-02-26 15:20:38 -0500 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-03-05 21:04:41 -0500 |
commit | 2d0d68ce93d35a46029879addd567c89cc41597d (patch) | |
tree | a37e362f88b8a201611c1e4d6436e6c84a264500 /config.def.h | |
parent | 37b25c9685f265acaf864cb91c6c540befcfb80b (diff) | |
download | dwm-2d0d68ce93d35a46029879addd567c89cc41597d.tar.gz dwm-2d0d68ce93d35a46029879addd567c89cc41597d.zip |
patch: holdbar
dwm's built-in status bar is now only shown when HOLDKEY is pressed. In
addition the bar will now overlay the display. This will work
regardless of the topbar setting. This is meant to be used with the bar
off by default.
None of the togglebar code has been removed, although you might want to
remove the togglebar binding in your config.def.h. The holdbar-modkey
patch (this) is a variant where holdbar is only active when the bar is
toggled off and the holdkey can be the same as the modkey.
This reverts commit 8657affa2a61 ("drawbar: Don't expend effort drawing
bar if it is occluded"). When holdbar is applied, its effect prevents
the bar from ever being drawn. Only a black rectangle appears when the
key is held.
This patch allows HOLDKEY to also be used in place of MODKEY for sending
keystrokes to dwm while simultaneously peeking at the statusbar.
Diffstat (limited to 'config.def.h')
-rw-r--r-- | config.def.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index 9ef5309..aae7682 100644 --- a/config.def.h +++ b/config.def.h @@ -3,7 +3,7 @@ /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ -static const int showbar = 1; /* 0 means no bar */ +static const int showbar = 0; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=10" }; static const char dmenufont[] = "monospace:size=10"; @@ -58,6 +58,8 @@ static const Layout layouts[] = { { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, +#define HOLDKEY XK_Super_L +#define HOLDMOD Mod4Mask /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } @@ -79,7 +81,7 @@ static const Key keys[] = { { MODKEY|ShiftMask, XK_z, spawn, {.v = slockucmd } }, { MODKEY|ShiftMask, XK_backslash, spawn, {.v = browsercmd } }, { MODKEY|ControlMask|ShiftMask, XK_backslash, spawn, {.v = browserpcmd } }, - { MODKEY, XK_b, togglebar, {0} }, + { MODKEY, HOLDKEY, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_i, incnmaster, {.i = +1 } }, @@ -109,6 +111,7 @@ static const Key keys[] = { TAGKEYS( XK_9, 8) TAGKEYS( XK_0, 9) { MODKEY|ShiftMask, XK_q, quit, {0} }, + { 0, HOLDKEY, holdbar, {0} }, }; /* button definitions */ |