aboutsummaryrefslogtreecommitdiff
path: root/doc/asciidoc/client-patterns.txt
blob: 5b00e0c8c7c4a338407e4704619f4ed3d295ec23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
A 'pattern' looks like this:::
	*(*['propertyname'[!]=]'regexp'*)* ...

Match definitions are enclosed in parentheses *(*...*)*, and if no
'propertyname' is given then *Name* is assumed. The 'regexp' can contain any
regular expression, or the special value *[current]*, which matches the
corresponding value of the currently focused window. See 'regex(7)' for more
information on acceptable regular expressions.

'propertyname' is not case sensitive, whereas the 'regexp' is.

If you specify multiple *('pattern'*) arguments, this implies an AND condition -
All specified patterns must match.

You can use *=* to test for equality or *!=* to test for inequality.

The following values are accepted for 'propertyname':::
*Name*;;
	A string, corresponding to the CLASSNAME property (The first field of
	WM_CLASS from the output of the *xprop(1)* utility).
*Class*;;
	A string, corresponding to the CLASSCLASS property (The second field of
	WM_CLASS from the output of the *xprop(1)* utility).
*Title*;;
	A string, corresponding to the window title (WM_NAME from *xprop(1)*).
*Role*;;
	A string, corresponding to the ROLE property (WM_WINDOW_ROLE from 
	*xprop(1)*).
*Transient*;;
	Either *yes* or *no*, depending on whether the window is transient
	(typically, a popup dialog) or not.
*Maximized*;;
	Either *yes* or *no*, depending on whether the window is maximized or
	not.
*Minimized*;;
	Either *yes* or *no*, depending on whether the window is minimized
	(iconified) or not.
*Shaded*;;
	Either *yes* or *no*, depending on whether the window is shaded or
	not.
*Stuck*;;
	Either *yes* or *no*, depending on whether the window is sticky (on
	all workspaces) or not.
*FocusHidden*;;
	Either *yes* or *no*, depending on whether the window has asked to be
	left off the focus list (or, the alt-tab list), or not.
*IconHidden*;;
	Either *yes* or *no*, depending on whether the window has asked to be
	left off the icon list (or, the taskbar), or not.
*Urgent*;;
	Either *yes* or *no*, depending on whether the window has the urgent
	hint set.
*Workspace*;;
	A number corresponding to the workspace number to which the window is
	attached. The first workspace here is *0*. You may also use *[current]* to
	match the currently visible workspace.
*WorkspaceName*;;
	A string corresponding to the name of the workspace to which the
	window is attached.
*Head*;;
	The number of the display head to which the window is attached. You
	may match this against the special value *[mouse]* which refers to the
	head where the mouse pointer currently resides.
*Layer*;;
	The string name of the window's layer, which is one of
	*AboveDock*, *Dock*, *Top*, *Normal*, *Bottom*, *Desktop*
*@XPROP*;;
	A string, corresponding to any xproperty (Use either the *xprop(1)*
	utility or the 'SetXProp' command to set a xproperty to a window)

.Matches any windows with the CLASSNAME of "xterm"
..........
(xterm)
..........

.Matches any windows with the same CLASSNAME as the currently focused window
..........
(Name=[current])
..........

.Matches any windows on the same head as the mouse but on a different layer than the currently focused window
...........
(Head=[mouse]) (Layer!=[current])
...........

.Matches any windows having a xproperty named FOO with "bar" in it
..............
(@FOO=.*bar.*)
..............