1labwc-actions(5) File Formats Manual labwc-actions(5)
2
3
4
6 labwc - actions
7
9 Actions are used in menus and keyboard/mouse bindings.
10
11 <action name="Close" />
12 Close top-most window.
13
14 <action name="Kill" />
15 Kill the process associated with the current window by sending it
16 the SIGTERM signal.
17
18 <action name="Execute" command="value" />
19 Execute command. Note that in the interest of backward compatibil‐
20 ity, labwc supports <execute> as an alternative to <command> even
21 though openbox documentation states that it is deprecated. Note:
22 Tilde (~) is expanded in the command before passing to execvp()
23
24 <action name="Exit" />
25 Exit labwc.
26
27 <action name="Focus" />
28 Give focus to window under cursor.
29
30 <action name="Unfocus" />
31 Remove focus from the window that is currently focused.
32
33 <action name="Raise" />
34 Restack the current window above other open windows.
35
36 <action name="Lower" />
37 Restack the current window below other open windows.
38
39 <action name="Iconify" />
40 Iconify (minimize) focused window.
41
42 <action name="Move" />
43 Begin interactive move of window under cursor
44
45 <action name="MoveToEdge" direction="value" snapWindows="value" />
46 Move window until it hits the next edge.
47
48 direction [left|up|right|down] Direction in which to move.
49
50 snapWindows [yes|no] Move window until it hits an edge of another
51 window or screen edge. If set to "no", only move to the next screen
52 edge. Default is yes.
53
54 <action name="Resize" />
55 Begin interactive resize of window under cursor
56
57 <action name="ResizeRelative" left="" right="" top="" bottom="" />
58 Resize window relative to its current size. Values of left, right,
59 top or bottom tell how much to resize on that edge of window, posi‐
60 tive values grow window, negative shrink window.
61
62 <action name="GrowToEdge" direction="value" />
63 Resize window to fill the space between its edge and any other win‐
64 dow edge.
65
66 direction [left|up|right|down] Direction in which to grow.
67
68 <action name="ShrinkToEdge" direction="value" />
69 Reverse of GrowToEdge. Shrinks by a maximum of 50%.
70
71 direction [left|up|right|down] Direction in which to shrink.
72
73 <action name="MoveTo" x="" y="" />
74 Move to position (x, y)
75
76 <action name="MoveToCursor" />
77 Move to be centered on cursor. Tries to prevent any part of the
78 window from going off-screen.
79
80 <action name="MoveRelative" x="" y="" />
81 Move window relative to its current position. Positive value of x
82 moves it right, negative left. Positive value of y moves it down,
83 negative up.
84
85 <action name="SnapToEdge" direction="value" />
86 Resize window to fill half the output in the given direction. Sup‐
87 ports directions "left", "up", "right", "down" and "center".
88
89 <action name="SnapToRegion" region="value" />
90 Resize and move active window according to the given region. See
91 labwc-config(5) for further information on how to define regions.
92
93 <action name="NextWindow" />
94 Cycle focus to next window.
95
96 <action name="PreviousWindow" />
97 Cycle focus to previous window.
98
99 <action name="Reconfigure" />
100 Re-load configuration and theme files.
101
102 <action name="ShowMenu" menu="value" />
103 Show menu. Valid menu names are "root-menu" and "client-menu".
104
105 <action name="ToggleDecorations" />
106 Toggle decorations of focused window.
107
108 This is a 3-state action which can be executed multiple times:
109 • Only the titlebar will be hidden, borders and resize area are
110 kept
111 • Remaining decorations will be disabled
112 • Decorations will be shown normally
113
114
115 By disabling the theme configuration 'keepBorder' the first step
116 will be removed and the action only toggles between on and off.
117
118 <action name="ToggleFullscreen" />
119 Toggle fullscreen state of focused window.
120
121 <action name="ToggleMaximize" direction="value" />
122 Toggle maximize state of focused window. Supported directions are
123 "both" (default), "horizontal", and "vertical".
124
125 <action name="Maximize" direction="value" />
126 Maximize focused window. Supported directions are "both" (default),
127 "horizontal", and "vertical".
128
129 <action name="ToggleAlwaysOnTop" />
130 Toggle always-on-top of focused window.
131
132 <action name="ToggleAlwaysOnBottom" />
133 Toggle between layers 'always-on-bottom' and 'normal'. When a win‐
134 dow is in the 'always-on-bottom' layer, it is rendered below all
135 other top-level windows. It is anticipated that this action will be
136 useful when defining window-rules for desktop-management tools that
137 do not support the wlr-layer-shell protocol.
138
139 <action name="ToggleKeybinds" />
140 Stop handling keybinds other than ToggleKeybinds itself. This can
141 be used to allow A-Tab and similar keybinds to be delivered to Vir‐
142 tual Machines, VNC clients or nested compositors. A second call
143 will restore all original keybinds.
144
145 This action will only affect the window that had keyboard focus
146 when the binding was executed. Thus when switching to another win‐
147 dow, all the usual keybinds will function again until switching
148 back to the original window. There can be multiple windows with
149 this mode set.
150
151 <action name="FocusOutput" output="HDMI-A-1" />
152 Give focus to topmost window on given output and warp the cursor to
153 the center of the window. If the given output does not contain any
154 windows, the cursor is centered on the given output.
155
156 <action name="GoToDesktop" to="value" wrap="yes" />
157 Switch to workspace.
158
159 to The workspace to switch to. Supported values are "current",
160 "last", "left", "right" or the full name of a workspace or its in‐
161 dex (starting at 1) as configured in rc.xml.
162
163 wrap [yes|no] Wrap around from last desktop to first, and vice
164 versa. Default yes.
165
166 <action name="SendToDesktop" to="value" follow="yes" wrap="yes" />
167 Send active window to workspace.
168
169 to The workspace to send the window to. Supported values are the
170 same as for GoToDesktop.
171
172 follow [yes|no] Also switch to the specified workspace. Default
173 yes.
174
175 wrap [yes|no] Wrap around from last desktop to first, and vice
176 versa. Default yes.
177
178 <action name="None" />
179 If used as the only action for a binding: clear an earlier defined
180 binding.
181
183 Actions that execute other actions. Used in keyboard/mouse bindings.
184
185 <action name="If">
186 This action will execute one set of actions if the focused window
187 matches the criteria, or another if it does not.
188
189 The arguments are as follows:
190
191 <action name="If">
192 <query/>
193 <then><action/></then>
194 <else><action/></else>
195 </action>
196
197 query
198 Define a query with zero or more conditions. All conditions
199 must be evaluated as true in order for the window to match this
200 query. Multiple queries can be defined.
201
202 Pattern matching is done according to glob(7) and is case-in‐
203 sensitive.
204
205 Conditions are as follows:
206
207 identifier
208 XDG shell app_id for Wayland clients, WM_CLASS for XWayland
209 clients.
210
211 title
212 XDG shell title for Wayland clients, WM_NAME for XWayland
213 clients.
214
215 This argument is optional.
216
217 then
218 A list of actions to be executed if the window matches any
219 query. This argument is optional.
220
221 else
222 A list of actions to be executed if the window does not match
223 any query. This argument is optional.
224
225 <action name="ForEach">
226 Identical to "If" action, but applies to all windows, not just the
227 focused one.
228
230 labwc(1), labwc-config(5), labwc-theme(5), glob(7)
231
232
233
234 2023-11-26 labwc-actions(5)