mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 17:54:17 +00:00
Description
This patch adds an ability to add or change client rules at runtime.
The patch only adds one keybinding (Alt+Shift+R) to toggle isfloating
option, but this can be easily extended if you want to tweak other options as
well. You just need to define a new function similar to setruleisfloating and
add a new keybinding to config.h.
For example, this is a function I created for my build to toggle noswallow
option from the swallow patch:
void
setrulenoswallow(const Arg *arg) {
Rule *r = getrule(focustop(selmon));
if (!r)
return;
r->noswallow = !r->noswallow;
}
NOTE: If you happen to apply patches that add new options to the rules, make
sure to update rule_default variable in config.h as well.