refactor chainkeys patch

This commit is contained in:
atourist
2026-10-02 11:06:30 -07:00
parent f974a35dab
commit de72d2bb3c
3 changed files with 228 additions and 145 deletions
+11 -2
View File
@@ -7,9 +7,18 @@ 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:
```c
{ 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
- [git branch](https://codeberg.org/bencc/dwl/src/branch/chainkeys)
- [2024-05-20](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/chainkeys/chainkeys.patch)
- [chainkeys.patch](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/chainkeys/chainkeys.patch) Latest version, applies to main branch, tested on commit dwl/dwl@e2038450f2
- [chainkeys_2024-05-20.patch](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/chainkeys/chainkeys_2024-05-20.patch) Legacy version from 2024-05-20
### Authors
- [atourist](https://codeberg.org/atourist)
- [Ben Collerson](https://codeberg.org/bencc)