Tags with logic
Logic, wat?
Sometimes it can be pretty nasty to add tags, when you just need something stupid to move a certain window to a view. That can be done with a loop, but that also adds lots of tags and there cannot be more than 32 of them.
An easy way to bypass this is to add logic to tags and act differently for certain clients. The latest version of subtle extends the properties with on_match. This can be used to add a Ruby proc to a tag that is called whenever the tag is applied.
The tagging page already contains a simple example, here is a more complex one that I use in my config to tag GIMP windows:
Old way:
| New way:
|
Both basically just sets the gravity of the matching client.
Comments