[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Window Selection Expressions (WSE) were inspired by SQL. The intent is to allow writing consise code to select the windows you need and to act upon them (or just to get the list of selected windows). The implementation includes a set of (hopefully) consistent concisely-named wrappers for the StumpWM functionality useful for window set description and the act-on-matching-windows macro that encapsulates the logic of iterating over a window set.
If we had SQL in StumpWM, we would write
select window_id from windows as w where w.title = 'XTerm'
. WSE chooses to be
more Lisp-style and instead uses
(act-on-matching-windows (w) (titled-p w "XTerm") w)
The act-on-matching-windows
function also allows performing some
actions, for example getting all the windows titled XTerm into the
current group:
(act-on-matching-windows (w) (titled-p w "XTerm") (pull-w w))
Move all windows from the list to the group
Run code on all windows matching condition; var is the shared lambda variable. Range can be any screen/group/frame or :screen/:group/:frame for the current instance. Condition is just the code to evaluate.
Pull the window w: to the current group or to the specified group g.
Check whether window title of the window w is equal to the string title.
Check whether the window title of the window w matches the regular expression tre.
Check whether the window class of the window w is equal to the string class.
Check whether the window class of the window w matches the regular expression cre.
Check whether the window type of the window w is equal to the string type.
Check whether the window type of the window w matches the regular expression tre.
Check whether the window role of the window w is equal to the string role.
Check whether the window role of the window w matches the regular expression rre.
Check whether the window resource of the window w is equal to the string res.
Check whether the window resource of the window w matches the regular expression rre.
Check whether the window w belongs to the group name or the current group if name is not specified.
Check whether the window w belongs to the frame f or to the current frame if the frame is not specified.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 28, 2024 using texi2html 1.82.