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>
<keybind key="W-Up"><action name="ToggleMaximize"/></keybind>
See ToggleMaximize action.
No. I'm afraid that is not yet implemented.
Use <action name="SnapToEdge" direction="center" />
.
<keybind key="W-q"><action name="Close"/></keybind>
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>
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>
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>
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
Not yet implemented.
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>
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.
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.
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>
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.
To run a nested instance of openbox on labwc:
Xwayland -decorate -noreset :55
DISPLAY=:55 dbus-run-session openbox-session
If Electron clients are glitchy or lagging try setting these environment variables:
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
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