Implement new criterion 'workspace'.

If the match expression is a plain number (e.g., '99'), the number of a workspace will be compared strictly. Otherwise, the match expression is taken as a regular expression and compared against the workspace's name.
This allows all of the following:

for_window [workspace=5] ...
for_window [workspace="5:foo"] ...
for_window [workspace="foo"] ...

fixes #1769
This commit is contained in:
Ingo Bürk
2015-06-29 23:58:48 +02:00
parent 8df7e4ecb9
commit be406d036d
8 changed files with 55 additions and 2 deletions

View File

@ -1597,14 +1597,16 @@ urgent::
Compares the urgent state of the window. Can be "latest" or "oldest".
Matches the latest or oldest urgent window, respectively.
(The following aliases are also available: newest, last, recent, first)
workspace::
Compares the workspace name of the workspace the window belongs to.
con_mark::
Compares the mark set for this container, see <<vim_like_marks>>.
con_id::
Compares the i3-internal container ID, which you can get via the IPC
interface. Handy for scripting.
The criteria +class+, +instance+, +role+, +title+ and +mark+ are actually
regular expressions (PCRE). See +pcresyntax(3)+ or +perldoc perlre+ for
The criteria +class+, +instance+, +role+, +title+, +workspace+ and +mark+ are
actually regular expressions (PCRE). See +pcresyntax(3)+ or +perldoc perlre+ for
information on how to use them.
[[exec]]