41 lines
1.7 KiB
Markdown

build for dwl-git commit 15bfffd8
This patch adds river-control-unstable-v1 support to dwl, allowing changing dwl settings on the fly via dwlctl.
dwlctl is a small wayland program included with this patch that can sends arguments to dwl which then passes those to functions allowing the user to run any function they define in the horrably named `Func_str_type_pair_list` array.
This patch also changes binds and rules to use a linked list internally and adds functionality for dwlctl to create new binds and rules at runtime and clear all rules/binds that were added at runtime. (syntax examples bellow)
I use this dynamic bind/rule functionality to have almost all of my keybinds and rules defined in a shell script run at dwl's startup that calls dwlctl a bunch.
I recommend that if you do the same to have `dwlctl clear-binds` and `dwlctl clear-rules` at the start of your script since binds with the same mod and key don't fully replace each other, although rules with the EXACT same appid and title will by defualt.
Also Note that for keybinds only keys listed in `Keysym_str_pair_list` are supported so if a setting a keybind via dwlctl isn't worked check if the key is in there, if not add it.
example commands for using dwlctl with dwl:
Remember that support for any function can be added by just adding that function to the `Func_str_type_pair_list` array.
```
dwlctl clear-binds
dwlctl bind super,shift Return spawn kitty tmux
dwlctl bind supershift q killclient
dwlctl clear-rules
dwlctl rule-add -appid steam -title steam float tags $((1 << 2))
dwlctl rule-add -appid kitty float
dwlctl rule-add -title firefox float
dwlctl spawn kitty tmux
dwlctl setlayout 2
dwlctl togglefullscreen
```