Sawfish can trigger actions particular to each window. More
precisely, if the window’s properties match to the user set rule, then
it is executed when the window appears. Check is done in
before-add-window-hook. (see Standard Hooks)
These rules can easily be set by configurater GUI, but there’re
functions to manipulate them. They’re defined in
Let us see an example first:
(add-window-matcher '((WM_NAME . "^root$") (WM_CLASS . "^XTerm/xterm$")) '((ignore-program-position . t) (maximize . vertical)))
rules is an alist, and each value is matched using regex.
Allowed keys are any of
WM_LOCALE_NAME. Values to the keys are
strings. Windows are selected if all of these rules match.
actions is an alist. For possible keys and values, see lisp/sawfish/wm/ext/match-window.jl.
Check for invalid arguments are not done.
add-window-matcher, but unlike it, props are
list of properties. Example:
(remove-window-matcher '((WM_NAME . "^root$")) '(place-mode ignore-program-position))
The best place to use
add-window-matcher is in
~/.sawfish/rc. It’s because rules modified by these commands are
not necessarily saved, depending on how you run the configurator.
The rules are stored in variable
the above functions to modify its value. It is not recommended
to directly manipulate it.