Patch to enable a scratchpad feature in dwm as in i3wm.
- # define SCRATCHPAD_MASK (1u << sizeof tags / sizeof * tags) - macro that can be used in config.h
- static void scratchpad_hide (); - move selected window to scratchpad
- static void scratchpad_remove (); - remove selected window from scratchpad
- static void scratchpad_show (); - restore sequential window from scratchpad
- MODKEY, XK_minus - scratchpad_show
- MODKEY|ShiftMask, XK_minus - scratchpad_hide
- MODKEY, XK_equal - scratchpad_remove
Add something like this in rules (config.h):
{ NULL, "hidden", NULL, SCRATCHPAD_MASK, 0, -1 },
And launch something like this:
st -n hidden
namedscratchpads is a great scratchpad implementation, and this patch doesn't conflict with it. Why to use both this and the namedscratchpads patches? Because though they're both named 'scratchpad' patches, they do different things. This patch doesn't implement namedscratchpads' functionality to avoid bloating and keep simple.
Thanks to Anukul Adhikari for extending this patch to have multiple dynamic scratchpads.
https://dwm.suckless.org/patches/dynamicscratchpads/
https://dwm.suckless.org/patches/multipledynamicscratchpads/