2025-02-14 00:05:15 +01:00

1019 B

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.

Download

Authors