Support a special value "__focused__" as a command criterion pattern for class, instance, title, window_role and workspace.

This special value will match if the window's property equals that of the currently focused window.

relates to #1770
This commit is contained in:
Ingo Bürk
2015-08-28 08:26:27 +02:00
parent b68a400abf
commit 54d270e359
2 changed files with 48 additions and 17 deletions

View File

@ -1604,25 +1604,35 @@ for_window [class="^evil-app$"] floating enable, move container to workspace 4
The criteria which are currently implemented are:
class::
Compares the window class (the second part of WM_CLASS)
Compares the window class (the second part of WM_CLASS). Use the
special value +__focused__+ to match all windows having the same window
class as the currently focused window.
instance::
Compares the window instance (the first part of WM_CLASS)
Compares the window instance (the first part of WM_CLASS). Use the
special value +__focused__+ to match all windows having the same window
instance as the currently focused window.
window_role::
Compares the window role (WM_WINDOW_ROLE).
Compares the window role (WM_WINDOW_ROLE). Use the special value
+__focused__+ to match all windows having the same window role as the
currently focused window.
window_type::
Compare the window type (_NET_WM_WINDOW_TYPE). Possible values are
+normal+, +dialog+, +utility+, +toolbar+, +splash+, +menu+, +dropdown_menu+,
+popup_menu+ and +toolti+.
Compare the window type (_NET_WM_WINDOW_TYPE). Possible values are
+normal+, +dialog+, +utility+, +toolbar+, +splash+, +menu+, +dropdown_menu+,
+popup_menu+ and +toolti+.
id::
Compares the X11 window ID, which you can get via +xwininfo+ for example.
title::
Compares the X11 window title (_NET_WM_NAME or WM_NAME as fallback).
Use the special value +__focused__+ to match all windows having the
same window title as the currently focused window.
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.
Compares the workspace name of the workspace the window belongs to. Use
the special value +__focused__+ to match all windows in the currently
focused workspace.
con_mark::
Compares the mark set for this container, see <<vim_like_marks>>.
con_id::