labwc-actions(5) | File Formats Manual | labwc-actions(5) |
labwc - actions
Actions are used in menus and keyboard/mouse bindings.
<action name="Close" />
<action name="Kill" />
<action name="Execute" command="value" />
<action name="Exit" />
<action name="Focus" />
<action name="Unfocus" />
<action name="Raise" />
<action name="Lower" />
<action name="Iconify" />
<action name="Move" />
<action name="MoveToEdge" direction="value" snapWindows="value" />
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.
<action name="Resize" />
<action name="ResizeRelative" left="" right="" top="" bottom="" />
<action name="GrowToEdge" direction="value" />
direction [left|up|right|down] Direction in which to grow.
<action name="ShrinkToEdge" direction="value" />
direction [left|up|right|down] Direction in which to shrink.
<action name="MoveTo" x="" y="" />
<action name="ResizeTo" width="" height="" />
width The width to resize the window to in pixels.
height The height to resize the window to in pixels.
<action name="MoveToCursor" />
<action name="MoveRelative" x="" y="" />
<action name="SnapToEdge" direction="value" />
<action name="SnapToRegion" region="value" />
<action name="NextWindow" />
<action name="PreviousWindow" />
<action name="Reconfigure" />
<action name="ShowMenu" menu="value" />
<action name="ToggleDecorations" />
This is a 3-state action which can be executed multiple times:
By disabling the theme configuration 'keepBorder' the first step will be removed and the action only toggles between on and off.
<action name="ToggleFullscreen" />
<action name="ToggleMaximize" direction="value" />
<action name="Maximize" direction="value" />
<action name="ToggleAlwaysOnTop" />
<action name="ToggleAlwaysOnBottom" />
<action name="ToggleOmnipresent" />
<action name="ToggleKeybinds" />
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.
<action name="ToggleTearing" />
<action name="FocusOutput" output="HDMI-A-1" />
<action name="MoveToOutput" name="HDMI-A-1" direction="value" />
If name is specified, the window will be sent directly to the specified output and direction is ignored. If name 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).
<action name="FitToOutput" />
<action name="GoToDesktop" to="value" wrap="yes" />
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.
<action name="SendToDesktop" to="value" follow="yes" wrap="yes" />
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.
<action name="VirtualOutputAdd" output_name="value" />
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:
<keybind key="W-v"> <action name="VirtualOutputAdd" output_name="ScreenCasting"/> <action name="Execute" command='sh -c "wlr-randr --output ScreenCasting --pos 0,0 --scale 2 --custom-mode 3840x2110; wlr-randr --output eDP-1 --pos 0,0 --scale 2 --mode 3840x2160"'/> </keybind> <keybind key="W-c"> <action name="VirtualOutputRemove"/> </keybind>
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".
<action name="VirtualOutputRemove" output_name="value" />
output_name The name of virtual output. If not supplied, will remove the last virtual output added.
<action name="AutoPlace" />
<action name="Shade" />
<action name="Unshade" />
<action name="ToggleShade" />
<action name="None" />
Actions that execute other actions. Used in keyboard/mouse bindings.
<action name="If">
The arguments are as follows:
<action name="If"> <query/> <then><action/></then> <else><action/></else> </action>
query
Pattern matching is done according to glob(7) and is case-insensitive.
Conditions are as follows:
identifier
title
This argument is optional.
then
else
<action name="ForEach">
labwc(1), labwc-config(5), labwc-theme(5), glob(7)
2024-04-01 |