Skip to content

labwc Desktop Environment

labwc is a configurable and lightweight wlroots-based Wayland-compatible desktop environment.

As of May 2025, Labwc is no longer the default compositor in Ghaf. Labwc can still be explicitly enabled by specifying the configuration option profiles.graphics.compositor = "labwc" or adjusting the default compositor value in graphics.nix.

The basis of the labwc configuration is the set of following files: rc.xml, menu.xml, autostart, and environment. These files can be edited by substituting in the labwc overlay overlays/custom-packages/labwc/default.nix.

The border color concept illustrates the application trustworthiness in a user-friendly manner. The color shows the application’s security level and allows avoiding user’s mistakes. The same approach can be found in other projects, for example, QubeOS.

Ghaf uses patched labwc which makes it possible to change the border color for the chosen application. The implementation is based on window rules by substituting the server decoration colors (serverDecoration = yes). The borderColor property is responsible for the frame color.

For example, the foot terminal with Aqua colored frame:

<windowRules>
<windowRule identifier="Foot" borderColor="#00FFFF" serverDecoration="yes" skipTaskbar="yes" />
<windowRule identifier="firefox" borderColor="#FF0000" serverDecoration="yes" skipTaskbar="yes" />
</windowRules>

Foot Terminal with Aqua Colored Frame

With a touch-capable display connected, touch input may be misaligned in multi-display setups using Labwc. The touch area often spans all connected screens instead of the intended one. To resolve this, the touch input must be explicitly mapped to the correct display output.

Add the following entry to Ghaf’s Labwc configuration in labwc.config.nix:

<touch deviceName="[libinput device name]" mapToOutput="[display output name]" mouseEmulation="no"/>
  • deviceName: Name of the touch input device from libinput list-devices
  • mapToOutput: Name of the display output (e.g., DP-1)

Steps How To Get The Correct deviceName and display output

Section titled “Steps How To Get The Correct deviceName and display output”
  1. In Ghaf, run libinput list-devices to get the touch device name.
  2. In Ghaf, run wlr-randr to get the display port used by the touch device (e.g. DP-1).
  3. Add the <touch> config entry to the Ghaf Labwc config in labwc.config.nix.
  4. Rebuild the target Ghaf system.
<touch deviceName="FlatFrog FlatFrog DA-TK55P-20P2WE-M4-00e5" mapToOutput="DP-1" mouseEmulation="no"/>