Files
dwl-patches/patches/chainkeys
2026-10-02 11:06:30 -07:00
..
2026-10-02 11:06:30 -07:00
2026-10-02 11:06:30 -07:00

Description

Implements chained keybindings (like the dwm keychain patch).

Bindings can share a leading chain key. This chain key will be triggered when Mod+chain is pressed. A subsequent keypress will be matched against bindings for that chain key. If it is configured the action will be triggered, otherwise the keypress will be ignored.

To use chainkeys, append the key after the argument in the keybindings. Example usage:

	{ MODKEY,                    XKB_KEY_d,           incnmaster,       {.i = -1} },
	{ MODKEY,                    XKB_KEY_s,           setmfact,         {.f = -0.05f}, XKB_KEY_h },
	{ MODKEY,                    XKB_KEY_s,           setmfact,         {.f = +0.05f}, XKB_KEY_l },

Here, MODKEY+i triggers incnmaster to decrease nmaster, while MODKEY+s triggers a chain. After triggering the chain, pressing h or l changes the monitor's mfact and resets the chain.

Download

Authors