Top Related Projects
i3-compatible Wayland compositor
Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
A tiling window manager for X11
A tiling window manager based on binary space partitioning
A manual tiling window manager for X11
Rofi: A window switcher, application launcher and dmenu replacement
Quick Overview
Labwc is a Wayland compositor and window manager inspired by Openbox. It aims to provide a lightweight, customizable environment for Linux desktop users who prefer a minimalist approach. Labwc combines the simplicity of Openbox with the modern features of Wayland.
Pros
- Lightweight and resource-efficient
- Highly customizable through XML configuration files
- Wayland-native, providing better security and performance
- Familiar interface for Openbox users transitioning to Wayland
Cons
- Limited feature set compared to full desktop environments
- Steeper learning curve for users new to window managers
- Smaller community and ecosystem compared to more established compositors
- May require manual configuration for some advanced features
Getting Started
To get started with Labwc, follow these steps:
-
Install Labwc on your Linux distribution:
# For Arch Linux sudo pacman -S labwc # For Debian/Ubuntu sudo apt install labwc
-
Create a basic configuration file:
mkdir -p ~/.config/labwc cp /etc/xdg/labwc/rc.xml ~/.config/labwc/
-
Start Labwc:
exec labwc
-
Customize your environment by editing
~/.config/labwc/rc.xml
and other configuration files as needed.
For more detailed information and advanced configuration options, refer to the official documentation on the Labwc GitHub repository.
Competitor Comparisons
i3-compatible Wayland compositor
Pros of Sway
- More mature and feature-rich Wayland compositor
- Larger community and ecosystem support
- Extensive documentation and user guides
Cons of Sway
- Steeper learning curve for new users
- Heavier resource usage compared to Labwc
- Less flexibility in window management paradigms
Code Comparison
Sway (written in C):
static void
view_update_outputs(struct sway_view *view, struct wlr_box *before) {
if (!view->container || !view->surface) {
return;
}
struct sway_container *container = view->container;
struct wlr_box box;
view_get_box(view, &box);
struct sway_output *old_output = container->pending.output;
struct sway_output *new_output = container_get_effective_output(container);
// ... (additional logic)
}
Labwc (written in C):
static void
view_update_output(struct view *view)
{
struct output *output;
wl_list_for_each(output, &server.outputs, link) {
if (wlr_output_layout_contains_point(server.output_layout,
output->wlr_output, view->x, view->y)) {
view->output = output;
return;
}
}
}
Both projects use similar approaches for updating view outputs, but Sway's implementation appears more complex due to its more extensive feature set.
Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
Pros of Hyprland
- Advanced compositing features with GPU acceleration
- Dynamic tiling and floating window management
- Extensive customization options through configuration files
Cons of Hyprland
- Higher system requirements due to GPU-intensive operations
- Steeper learning curve for configuration and usage
- Less stable compared to more established window managers
Code Comparison
Hyprland configuration example:
monitor=,preferred,auto,1
input {
kb_layout = us
follow_mouse = 1
}
general {
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgba(33ccffee)
}
Labwc configuration example:
<openbox_config>
<theme>
<name>Clearlooks</name>
</theme>
<desktops>
<number>4</number>
<names>
<name>Desktop 1</name>
<name>Desktop 2</name>
<name>Desktop 3</name>
<name>Desktop 4</name>
</names>
</desktops>
</openbox_config>
Summary
Hyprland offers advanced features and customization but requires more resources and expertise. Labwc provides a simpler, more traditional approach with lower system requirements and easier configuration. The choice between them depends on user preferences and system capabilities.
A tiling window manager for X11
Pros of i3
- Mature and well-established project with a large user base and extensive documentation
- Highly customizable tiling window manager with a powerful scripting interface
- Supports multiple monitors and workspaces out of the box
Cons of i3
- Steep learning curve for new users due to its keyboard-centric approach
- Limited support for traditional desktop environments and graphical customization
- Requires manual configuration for many features that are automatic in other window managers
Code Comparison
i3 configuration example:
bar {
status_command i3status
position top
}
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+q kill
labwc configuration example:
<keyboard>
<default>
<keybind key="W-Return">
<action name="Execute"><command>foot</command></action>
</keybind>
<keybind key="A-F4">
<action name="Close"/>
</keybind>
</default>
</keyboard>
Both projects use configuration files, but i3 uses a custom syntax while labwc uses XML. i3's configuration is more concise, while labwc's XML structure may be more familiar to some users.
A tiling window manager based on binary space partitioning
Pros of bspwm
- Highly customizable and lightweight tiling window manager
- Extensive scripting capabilities for advanced users
- Efficient keyboard-driven workflow
Cons of bspwm
- Steeper learning curve for new users
- Requires manual configuration and setup
- Limited built-in features compared to full desktop environments
Code Comparison
bspwm configuration example:
#! /bin/sh
bspc monitor -d I II III IV V VI VII VIII IX X
bspc config border_width 2
bspc config window_gap 12
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
labwc configuration example:
<openbox_config>
<theme>
<name>Clearlooks</name>
</theme>
<desktops>
<number>4</number>
<names>
<name>1</name>
<name>2</name>
<name>3</name>
<name>4</name>
</names>
</desktops>
</openbox_config>
bspwm focuses on tiling window management with a minimalist approach, while labwc provides a more traditional stacking window manager experience with Openbox compatibility. bspwm offers greater flexibility for advanced users, but labwc may be more accessible for those familiar with traditional desktop environments.
A manual tiling window manager for X11
Pros of herbstluftwm
- Manual tiling window manager with flexible layouts
- Highly customizable through configuration scripts
- Supports multiple monitors with independent workspaces
Cons of herbstluftwm
- Steeper learning curve due to manual tiling nature
- Less intuitive for users accustomed to traditional desktop environments
- Configuration requires scripting knowledge
Code Comparison
herbstluftwm configuration example:
hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-w close
hc keybind $Mod-Return spawn ${TERMINAL:-xterm}
labwc configuration example:
<keyboard>
<default>
<keybind key="A-F4">
<action name="Close"/>
</keybind>
<keybind key="W-Return">
<action name="Execute">
<command>alacritty</command>
</action>
</keybind>
</default>
</keyboard>
herbstluftwm uses a bash-like syntax for configuration, while labwc uses XML. herbstluftwm's approach offers more flexibility but may be less intuitive for some users. labwc's XML configuration is more structured and potentially easier to read for those familiar with markup languages.
Rofi: A window switcher, application launcher and dmenu replacement
Pros of Rofi
- More mature project with a larger user base and extensive documentation
- Highly customizable with theming support and scripting capabilities
- Versatile application launcher, window switcher, and dmenu replacement
Cons of Rofi
- Focused solely on application launching and window switching
- Heavier resource usage compared to Labwc's lightweight approach
- More complex configuration and setup process
Code Comparison
Rofi configuration example:
rofi.theme: /path/to/theme.rasi
rofi.modi: window,run,ssh
rofi.width: 50
rofi.lines: 15
rofi.columns: 1
Labwc configuration example:
<keyboard>
<keybind key="W-r">
<action name="Execute">
<command>rofi -show run</command>
</action>
</keybind>
</keyboard>
While Rofi focuses on providing a flexible application launcher and window switcher, Labwc is a Wayland compositor that can integrate with Rofi for launching applications. Labwc's configuration is typically simpler, focusing on window management and keybindings, while Rofi offers more extensive customization options for its specific functions.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
labwc
[Website] [Scope] [IRC Channel] [Release Notes]
- 1. Project Description
- 2. Build and Installation
- 3. Configuration
- 4. Theming
- 5. Translations
- 6. Usage
- 7. Integration
1. Project Description
1.1 What Is This?
Labwc stands for Lab Wayland Compositor, where lab can mean any of the following:
- sense of experimentation and treading new ground
- inspired by BunsenLabs and ArchLabs
- your favorite pet
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 takes a no-bling/frills approach and says no to features such as animations. 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 has no reliance on any particular Desktop Environment, Desktop Shell or session. Nor does it depend on any UI toolkits such as Qt or GTK.
1.2 Why?
Firstly, we believe that there is a need for a simple Wayland window-stacking compositor which strikes a balance between minimalism and bloat approximately at the level where Window Managers like Openbox reside in the X11 domain. Most of the core developers are accustomed to low resource Desktop Environments such as Mate/XFCE or standalone Window Managers such as Openbox under X11. Labwc aims to make a similar setup possible under Wayland, with small and independent components rather than a large, integrated software eco-system.
Secondly, the Wayland community has achieved an amazing amount so far, and we want to help solve the unsolved problems to make Wayland viable for more people. We think that standardisation and de-fragmentation is a route to greater Wayland adoption, and wanting to play our part in this, Labwc only understands wayland-protocols & wlr-protocols, and it cannot be controlled with dbus, sway/i3/custom-IPC or other technology.
Thirdly, it is important to us that scope is tightly controlled so that the compositor matures to production quality. On the whole, we value robustness, reliability, stability and simplicity over new features. Coming up with new ideas and features is easy - maintaining and stabilising them is not.
Fourthly, we are of the view that a compositor should be boring in order to do its job well. In this regard we follow in the footsteps of metacity which describes itself as a "Boring window manager for the adult in you. Many window managers are like Marshmallow Froot Loops; Metacity is like Cheerios."
Finally, we think that an elegant solution to all of this does not need feel square and pixelated like something out of the 1990s, but should look contemporary and enable cutting-edge performance.
1.3 Why The Openbox Theme Specification?
In order to avoid reinventing configuration and theme syntaxes, the openbox 3.6 specification is used. This does not mean that labwc is an openbox clone but rather that configuration files will look and feel familiar.
Also, parsing GTK3+ and Qt themes for window decorations is very complicated, so using much simpler specs such as those used by openbox and xfwm makes sense for a compositor such as labwc, both in terms of implementation and for user modification.
Openbox spec is somewhat of a stable standard considering how long it has remained unchanged for and how wide-spread its adoption is by lightweight distributions such as LXDE, LXQt, BunsenLabs, ArchLabs, Mabox and Raspbian. Some widely used themes (for example Numix and Arc) have built-in support.
We could have invented a whole new syntax, but that's not where we want to spend our effort.
1.4 Very High Level Scope
A lot of emphasis is put on code simplicity when considering features.
The main development effort is focused on producing a solid foundation for a stacking compositor rather than adding configuration and theming options.
See scope for full details on implemented features.
High-level summary of items that Labwc supports:
- Config files (rc.xml, autostart, shutdown, environment, menu.xml)
- Theme files and xbm/png/svg icons
- Basic desktop and client menus
- HiDPI
- wlroots protocols such as
output-management
,layer-shell
andforeign-toplevel
- Optionally xwayland
1.5 Videos
video link | date | duration |
---|---|---|
0.7.2-release-video | 24-May-2024 | 3:17 |
0.6.0-release-video | 31-Oct-2022 | 2:48 |
0.3.0-release-video | 05-Aug-2021 | 1:10 |
pre-0.1.0-release-video | 25-Feb-2021 | 3:42 |
1.6 Screenshot
The obligatory screenshot:
Screenshot description
2. Build and Installation
To build, simply run:
meson setup build/
meson compile -C build/
Run-time dependencies include:
- wlroots, wayland, libinput, xkbcommon
- libxml2, cairo, pango, glib-2.0
- libpng
- librsvg >=2.46 (optional)
- xwayland, xcb (optional)
Build dependencies include:
- meson, ninja, gcc/clang
- wayland-protocols
Disable xwayland with meson -Dxwayland=disabled build/
For OS/distribution specific details see wiki.
If the right version of wlroots
is not found on the system, the build setup
will automatically download the wlroots repo. If this fallback is not desired
please use:
meson setup --wrap-mode=nodownload build/
To enforce the supplied wlroots.wrap file, run:
meson setup --force-fallback-for=wlroots build/
If installing after using the wlroots.wrap file, use the following to prevent installing the wlroots headers:
meson install --skip-subprojects -C build/
3. Configuration
User config files are located at ${XDG_CONFIG_HOME:-$HOME/.config/labwc/}
with the following six files being used: rc.xml, menu.xml, autostart, shutdown,
environment and themerc-override.
Run labwc --reconfigure
to reload configuration and theme.
For a step-by-step initial configuration guide, see getting-started.
4. Theming
Themes are located at ~/.local/share/themes/\<theme-name\>/openbox-3/
or
equivalent XDG_DATA_{DIRS,HOME}
location in accordance with freedesktop XDG
directory specification.
For full theme options, see labwc-theme(5) or the themerc example file.
For themes, search the internet for "openbox themes" and place them in
~/.local/share/themes/
. Some good starting points include:
- https://github.com/addy-dclxvi/openbox-theme-collections
- https://github.com/the-zero885/Lubuntu-Arc-Round-Openbox-Theme
- https://bitbucket.org/archlabslinux/themes/
- https://github.com/BunsenLabs/bunsen-themes
5. Translations
The default window bar menu can be translated on the weblate platform.
6. Usage
./build/labwc [-s <command>]
NOTE: If you are running on NVIDIA, you will need the
nvidia-drm.modeset=1
kernel parameter.
If you have not created an rc.xml config file, default bindings will be:
combination | action |
---|---|
alt -tab | activate next window |
super -return | alacritty |
alt -F3 | bemenu |
alt -F4 | close window |
super -a | toggle maximize |
alt -mouse-left | move window |
alt -mouse-right | resize window |
alt -arrow | move window to edge |
super -arrow | resize window to fill half the output |
alt -space | show the window menu |
XF86_AudioLowerVolume | amixer sset Master 5%- |
XF86_AudioRaiseVolume | amixer sset Master 5%+ |
XF86_AudioMute | amixer sset Master toggle |
XF86_MonBrightnessUp | brightnessctl set +10% |
XF86_MonBrightnessDown | brightnessctl set 10%- |
A root-menu can be opened by clicking on the desktop.
6.1 Gaming
Cursor confinement is supported from version 0.6.2
. If using older versions,
use a nested gamescope instance for gaming. It can be added to steam via
game launch option: gamescope -f -- %command%
.
7. Integration
Suggested apps to use with labwc:
- Screen shooter: grim
- Screen recorder: wf-recorder
- Background image: swaybg
- Panel: waybar, yambar, lavalauncher, sfwbar
- Launchers: bemenu, fuzzel, wofi
- Output managers: wlopm, kanshi, wlr-randr
- Screen locker: swaylock
See integration for further details.
Top Related Projects
i3-compatible Wayland compositor
Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
A tiling window manager for X11
A tiling window manager based on binary space partitioning
A manual tiling window manager for X11
Rofi: A window switcher, application launcher and dmenu replacement
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot