Labwc - ArchWiki

Jump to content

# Labwc

1 language

- 日本語

From ArchWiki

Related articles

- Window manager
- Wayland#Compositors

Labwc stands for Lab Wayland Compositor[1]. According to the official website:

  Labwc is a wlroots-based window-stacking compositor for wayland, inspired by openbox.
  It is light-weight and independent with a focus on simply stacking windows well and rendering some window decorations. It relies on clients for panels, screenshots, wallpapers and so on to create a full desktop environment.
  Labwc tries to stay in keeping with wlroots and sway in terms of general approach and coding style.
  Labwc only understands wayland-protocols & wlr-protocols, and it cannot be controlled with dbus, sway/i3-IPC or other technology. The reason for this is that we believe that custom IPCs and protocols create a fragmentation that hinders general Wayland adoption.

## Installation

Labwc can be installed with the packages labwcAUR or labwc-gitAUR.

The default terminal emulator is foot. Before starting labwc it is advisable to either install it or set a new terminal in the configuration.

## Configuration

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

Reason: Multiple sections duplicate upstream documentation. Missing Template:ic and Template:man between other misc visual adjustments. (Discuss in Talk:Labwc)

Openbox 3.6 specification is used for configuration and theme syntaxes. Config layout for ~/.config/labwc/ :

  - autostart
  - environment
  - menu.xml
  - rc.xml
  - themerc-override
  - shutdown

See `man labwc-config and `man labwc-theme` for further details. rc.xml.all contain default settings with all options.

copy the sample configuration files located at `/usr/share/doc/labwc/` to `~/.config/labwc/`.

see integration for more configuration

### Autostart

~/.config/labwc/autostart is used as autostart.

### Keymap

On ~/.config/labwc/environment

The following keyboard-configuration variables are supported: XKB_DEFAULT_RULES, XKB_DEFAULT_MODEL, XKB_DEFAULT_LAYOUT, XKB_DEFAULT_VARIANT and XKB_DEFAULT_OPTIONS. :

    XKB_DEFAULT_LAYOUT=us
    XKB_DEFAULT_LAYOUT=us,de
    XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle
    XKB_DEFAULT_OPTIONS=grp:shift_caps_toggle

for details see xkeyboard-config(7)

### Typematic delay and rate

To change typematic delay and rate, you can add the following lines to your input section, these are default value:

    ~/.config/labwc/rc.xml

    <keyboard>
    <repeatRate>25</repeatRate>
    <repeatDelay>600</repeatDelay>
    </keyboard>

### Statusbar

waybar can be used.

    ~/.config/labwc/autostart

    waybar >/dev/null 2>&1 &

to enable a taskbar through the toplevel-foreign protocol in waybar-wlr-taskbar(5)

    ~/.config/waybar/config

    "modules-left": ["wlr/taskbar"],

     "wlr/taskbar": {
            "format": "{app_id}",
            "on-click": "minimize-raise",
        },

### Outputs

external tools like wlr-randr,kanshi

    ~/.config/labwc/autostart

    wlr-randr --output HDMI-A-2 --preferred --pos 0,0 --output HDMI-A-1 --preferred --pos -1920,0

#### Wallpaper

use autostart and wallpaper setter like swaybg, wallutils, wpaperd, wbgAUR etc

    ~/.config/labwc/autostart

    swaybg -c '#113344' >/dev/null 2>&1 &

### Custom keybindings

    ~/.config/labwc/rc.xml

    <keyboard>
    <keybind key="W-d"> <action name="Execute" command="fuzzel"/> </keybind>
    <keybind key="XF86_AudioLowerVolume">  <action name="Execute" command="wpctl set-volume  @DEFAULT_AUDIO_SINK@ 5%-"/> </keybind>
    <keybind key="XF86_AudioRaiseVolume"> <action name="Execute" command="wpctl set-volume  @DEFAULT_AUDIO_SINK@ 5%+"/> </keybind>
    <keybind key="XF86_AudioMute"> <action name="Execute" command="wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle "/> </keybind>
    <keybind key="XF86_MonBrightnessUp"> <action name="Execute" command="brightnessctl -e set 5%+"/> </keybind>
    <keybind key="XF86_MonBrightnessDown"> <action name="Execute" command="brightnessctl -e set 5%-"/> </keybind>
    </keyboard>

#### workspaces

    ~/.config/labwc/rc.xml

    <labwc_config>
    <desktops number="4" />
    <keyboard>
    <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-4"> <action name="GoToDesktop" to="4" /> </keybind>
    </keyboard>

    </labwc_config>

### Menu

it uses openbox sepecification menu. see /usr/share/doc/labwc/menu.xml and man labwc-menu. you can also use automatic menu generators for openbox like archlinux-xdg-menu, obmenu-generatorAUR,etc

example:

    <?xml version="1.0" ?>
    <openbox_menu>
    <menu id="root-menu" label="">
    <item label="󰈹   Firefox">
       <action name="Execute" command="firefox" />
     </item>
     <item label="  Terminal">
       <action name="Execute" command="foot" />
     </item>
     </menu>
     </openbox_menu>

### Xwayland

xorg-xwayland starts automatically if Xwayland support is enabled at build time. To force disable it, set:

    ~/.config/labwc/environment

    WLR_XWAYLAND=' '

## Starting

Like all wlroots-based compositor, polkit for seats when using systemd-logind or seatd with your user added to the `seat` user group.

To start Labwc, type `labwc` in the Linux console. Adding `-s foot` will start Labwc with foot running.

## See also

- GitHub project
- Website

Category:

- Wayland compositors

Hidden category:

- Pages or sections flagged with Template:Style