labwc-actions(5) # NAME labwc - actions # ACTIONS Actions are used in menus and keyboard/mouse bindings. ** Close top-most window. ** Kill the process associated with the current window by sending it the SIGTERM signal. ** Execute command. Note that in the interest of backward compatibility, labwc supports as an alternative to even though openbox documentation states that it is deprecated. Note: Tilde (~) is expanded in the command before passing to execvp(). ** Exit labwc. ** Give focus to window under cursor. ** Remove focus from the window that is currently focused. ** Restack the current window above other open windows. ** Restack the current window below other open windows. ** Iconify (minimize) focused window. ** Begin interactive move of window under cursor. ** Move window until it hits the next edge. *direction* [left|up|right|down] Direction in which to move. *snapWindows* [yes|no] Move window until it hits an edge of another window or screen edge. If set to "no", only move to the next screen edge. Default is yes. ** Begin interactive resize of window under cursor. ** Resize window relative to its current size. Values of left, right, top or bottom tell how much to resize on that edge of window, positive values grow window, negative shrink window. ** Resize window to fill the space between its edge and any other window edge. *direction* [left|up|right|down] Direction in which to grow. ** Reverse of GrowToEdge. Shrinks by a maximum of 50%. *direction* [left|up|right|down] Direction in which to shrink. ** Move to position (x, y). ** Resize window. *width* The width to resize the window to in pixels. *height* The height to resize the window to in pixels. ** Move to be centered on cursor. Tries to prevent any part of the window from going off-screen. ** Move window relative to its current position. Positive value of x moves it right, negative left. Positive value of y moves it down, negative up. ** Resize window to fill half the output in the given direction. Supports directions "left", "up", "right", "down" and "center". ** Resize and move active window according to the given region. See labwc-config(5) for further information on how to define regions. ** Cycle focus to next window. ** Cycle focus to previous window. ** Re-load configuration and theme files. ** Show a menu. *menu* The name of the menu to show. The menus "root-menu" and "client-menu" are guaranteed to exist, but others may be defined explicitly. See labwc-menu(5) for more information. *atCursor* [yes|no] When opening a menu, open the menu at the location of the mouse cursor. When set to no, the menu will appear at the upper-left corner of the window associated with the action. Default is yes. ** Toggle decorations of focused window. This is a 3-state action which can be executed multiple times: - Only the titlebar will be hidden, borders and resize area are kept - Remaining decorations will be disabled - Decorations will be shown normally By disabling the theme configuration 'keepBorder' the first step will be removed and the action only toggles between on and off. ** Toggle fullscreen state of focused window. ** Toggle maximize state of focused window. Supported directions are "both" (default), "horizontal", and "vertical". ** Maximize focused window. Supported directions are "both" (default), "horizontal", and "vertical". ** Toggle always-on-top of focused window. ** Toggle between layers 'always-on-bottom' and 'normal'. When a window is in the 'always-on-bottom' layer, it is rendered below all other top-level windows. It is anticipated that this action will be useful when defining window-rules for desktop-management tools that do not support the wlr-layer-shell protocol. ** Toggle omnipresent (visible on all workspaces / sticky) for the focused window. ** Stop handling keybinds other than ToggleKeybinds itself. This can be used to allow A-Tab and similar keybinds to be delivered to Virtual Machines, VNC clients or nested compositors. A second call will restore all original keybinds. This action will only affect the window that had keyboard focus when the binding was executed. Thus when switching to another window, all the usual keybinds will function again until switching back to the original window. There can be multiple windows with this mode set. ** Toggles tearing for the focused window. ** Give focus to topmost window on given output and warp the cursor to the center of the window. If the given output does not contain any windows, the cursor is centered on the given output. ** Moves active window to other output, unless the window state is fullscreen. If *output* is specified, the window will be sent directly to the specified output and *direction* is ignored. If *output* is omitted, *direction* may be one of "left", "right", "up" or "down" to indicate that the window should be moved to the next output in that direction (if one exists). *wrap* [yes|no] When using the direction attribute, wrap around from right-to-left or top-to-bottom, and vice versa. Default no. ** Resizes active window size to width and height of the output when the window size exceeds the output size. ** Switch to workspace. *to* The workspace to switch to. Supported values are "current", "last", "left", "right" or the full name of a workspace or its index (starting at 1) as configured in rc.xml. *wrap* [yes|no] Wrap around from last desktop to first, and vice versa. Default yes. ** Send active window to workspace. *to* The workspace to send the window to. Supported values are the same as for GoToDesktop. *follow* [yes|no] Also switch to the specified workspace. Default yes. *wrap* [yes|no] Wrap around from last desktop to first, and vice versa. Default yes. ** Add virtual output (headless backend). For example, it can be used to overlay virtual output on real output, but with a different resolution (this can be done with `wlr-randr` or `wdisplays`). After that, virtual output can be selected for screen sharing (casting), effectively sharing only the region of the screen. It must be noted that overlaying virtual output and real output is not endorsed or explicitly supported by wlroots. For example, after configuring virtual output, real output must be reconfigured as well (for the overlay configuration to work correctly). This is the example configuration: ``` ``` Note that the vertical resolution of "ScreenCasting" output is just 50px smaller than "eDP-1" output to cut off bottom panel from screen sharing. Virtual output is also useful for extending the desktop to (maybe mobile) remote systems like tablets. E.g. simply adding a virtual output, attaching wayvnc to it and running a VNC client on the remote system. *output_name* The name of virtual output. Providing virtual output name is beneficial for further automation. Default is "HEADLESS-X". ** Remove virtual output (headless backend). *output_name* The name of virtual output. If not supplied, will remove the last virtual output added. ** Use the automatic placement policy to move the active window to a position on its output that will minimize overlap with other windows. **++ **++ ** Set, unset, or toggle, respectively, the "shaded" state of the active window. When shaded, window contents are hidden, leaving only the titlebar visible. Full-screen windows or those without server-side decorations (including those for which the server-side titlebar has been hidden) are not eligible for shading. ** If used as the only action for a binding: clear an earlier defined binding. # CONDITIONAL ACTIONS Actions that execute other actions. Used in keyboard/mouse bindings. ** This action will execute one set of actions if the focused window matches the criteria, or another if it does not. The arguments are as follows: ``` ``` *query* Define a query with zero or more conditions. All conditions must be evaluated as true in order for the window to match this query. Multiple queries can be defined. Pattern matching is done according to glob(7) and is case-insensitive. Conditions are as follows: *identifier* XDG shell app_id for Wayland clients, WM_CLASS for XWayland clients. *title* XDG shell title for Wayland clients, WM_NAME for XWayland clients. This argument is optional. *then* A list of actions to be executed if the window matches any query. This argument is optional. *else* A list of actions to be executed if the window does not match any query. This argument is optional. ** Identical to "If" action, but applies to all windows, not just the focused one. # SEE ALSO labwc(1), labwc-config(5), labwc-theme(5), glob(7)