
[home] [readme] [integration] [getting-started] [manual] [more]
Frequently Asked Questions
1. Keybinds
1.1 Unset keybinds
Q:
How do I get Alt+Left/Right
to not move windows? I want
these to navigate forward/backwards in File Managers and Firefox.
You could either copy rc.xml.all
and just remove the
entries you do not want, such as
<keybind key="A-Left">
Or you could use the None
action or simply define a
keybind with no action (which does the same). For example:
<keyboard>
<default/>
<keybind key="A-Left"/>
<keybind key="A-Right"/>
</keyboard>
1.2 Common keybinds
Q:
How do I get Windows+Up
to
maximize/restore-to-previous-size a window?
<keybind key="W-Up"><action name="ToggleMaximize"/></keybind>
See ToggleMaximize action.
Q: Is it possible to launch wofi with only the Super key?
No. I’m afraid that is not yet implemented.
Q: Is it possible to show gaps for maximized windows?
Use
<action name="SnapToEdge" direction="center" />
.
Q: How do I close windows
with W-q
?
<keybind key="W-q"><action name="Close"/></keybind>
Q: Keybinds to switch-to / move-a-window-to workspace 1, 2 etc.?
In true sway
style:
<keybind key="W-1"><action name="GoToDesktop" to="1"/></keybind>
<keybind key="W-2"><action name="GoToDesktop" to="2"/></keybind>
<keybind key="W-3"><action name="GoToDesktop" to="3"/></keybind>
<keybind key="W-S-1"><action name="SendToDesktop" to="1" follow="false"/></keybind>
<keybind key="W-S-2"><action name="SendToDesktop" to="2" follow="false"/></keybind>
<keybind key="W-S-3"><action name="SendToDesktop" to="3" follow="false"/></keybind>
1.3 Keybind Forwarding
The ToggleKeybinds action allows better control of Virtual Machines, VNC clients, nested compositors or similar.
For example, to make alt-tab work in a nested compositor add the code
below to ~/.config/labwc/rc.xml
and then press F12 to
disable all keybinds in the parent compositor and thereby forward them
to the nested instance.
<keybind key="F12">
<action name="ToggleKeybinds"/>
</keybind>
2. Theme
2.1 Server Side Decoration
Q: Is it possible to completely remove windows’ title-bars?
Yes.
Action SetDecorations
can be used for this. This action
can be used with key/mousebinds or with window rules like this:
<windowRules>
<windowRule identifier="*">
<action name="SetDecorations" decorations="border" />
</windowRule>
</windowRules>
With window rules it can be achieve more simply as in the example below, but that will remove borders too:
<windowRules>
<windowRule identifier="*" serverDecoration="no" />
</windowRules>
Q: I’d like to be able to remove the client-menu button. How can this be done?
Add this to ~/.config/labwc/themerc-override
:
window.active.button.menu.unpressed.image.color: #000000 0
window.inactive.button.menu.unpressed.image.color: #000000 0
3. Mouse and Trackpads
3.1 Libinput
Q: How to scroll with the right edge of the trackpad?
Not yet implemented.
3.2 Mousebinds
Q: I’m used to MS Windows and would like all window to unfocus when I click the desktop. How can this be achieved?
<mouse>
<default />
<context name="Root">
<mousebind button="Left" action="Press">
<action name="Unfocus" />
</mousebind>
</context>
</mouse>
3.3 Cursor
Q: I cannot see a cursor. What should I do?
If no cursor is showing (sometimes reported by people running
vwmare), try adding WLR_NO_HARDWARE_CURSORS=1
to
~/.config/labwc/environment
.
If cursors do not update as expected, try installing a cursor theme
(for example Adwaita
) and set XCURSOR_THEME
in
~/.config/labwc/environment
accordingly (for example
XCURSOR_THEME=Adwaita
). labwc
handles missing
cursor themes by falling back on builtin old X11 cursors, but some
applications do not resulting in the wrong or no cursor being set.
4. XML
4.1 XML Nodenames
Q: My config file does not work. How can I debug it?
You a can a nested instance of labwc in a terminal to see the error messages relating to bad XML syntax of missing elements/attributes.
For more fine-grained analysis you can see the config/menu file
nodenames when labwc
starts, by setting the following
environment variables:
LABWC_DEBUG_CONFIG_NODENAMES=1
LABWC_DEBUG_MENU_NODENAMES=1
With labwc
a nodename is a way to refer to each element
and attribute in an XML tree. For example, the <c>
element below would be assigned the nodename c.b.a
:
<a>
<b>
<c>foo</c>
</b>
</a>
Please note that labwc
also parses the rc.xml
configuration file in an element/attribute agnostic way, which means
that <a><b>foo</b></a>
is
equivalent to <a b="foo"/>
. Be careful though,
because this does not apply to some aspects of menu.xml (specifically
the attributes id, label and execute).
In practical terms, this means that the following syntax could be used:
<keybind key="W-l" name.action="Execute" command.action="swaylock -c 000000"/>
…rather than then lengthier:
<keybind key="W-l">
<action name="Execute">
<command>swaylock -c 000000"</command>
</action>
</keybind>
See labwc-config(5)-syntax for more details.
5. Scripting
5.1 Run or Raise
The wlr-foreign-toplevel-management protocol provides clients with a list of opened applications and lets them request certain actions on them, like maximizing, focusing, etc. This can be used for scripting with clients such as wlrctl and lswt. For example, the script below launches an application if it is not already running, or focuses the application’s most recently opened window if it is already running:
#!/bin/sh
if test -z "$1"; then
echo "Usage: runraise app_id [executable]"
exit 1
fi
app_id=$1
executable=$2
test -z "$executable" && executable=$app_id
if ! wlrctl window focus "$app_id"; then
$executable &
disown
fi
As of labwc version 0.7.2 it is also possible to create a run or
raise keybind with the ForEach
action:
<keybind key="W-F1">
<action name="ForEach">
<query identifier="foot" />
<then>
<action name="Raise" />
<action name="Focus" />
</then>
<none>
<action name="Execute" command="foot" />
</none>
</action>
</keybind>
6. Environment Variables
There are a number of advanced settings that can be invoked for
wlroots
by setting some environment variables.
For example labwc
can be run nested on Wayland with
multiple outputs using the following:
WLR_WL_OUTPUTS=2 labwc
See the wlroots repo env_vars.md file for details.
7. Nested XWayland
To run a nested instance of openbox on labwc:
Xwayland -decorate -noreset :55
DISPLAY=:55 dbus-run-session openbox-session
8. Hardware
8.1 Nvidia
If Electron clients are glitchy or lagging try setting these environment variables:
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
8.2 Laptop Lid
When using a laptop with an external monitor and the built-in monitor is closed, the system may go into hibernation when disconnecting. To avoid this, edit the configuration file `etc/systemd/logind.conf’ and set following to ignore (see logind.conf(5) manual for more info):
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore