Introduction
LeftWM is a tiling window manager for X11 written in Rust. It is designed around the principle of separating concerns: the core window manager handles layout logic and window placement, while theming and visual appearance are managed by an independent theme process. This architecture allows users to change themes on the fly without restarting the window manager and ensures that a broken theme cannot crash the WM.
What LeftWM Does
- Manages windows in tiling layouts on X11 with automatic arrangement of new windows
- Separates the window manager core from the theming layer for independent customization
- Supports multiple monitors with configurable tag (workspace) assignments per screen
- Provides multiple built-in layout modes including columns, rows, Fibonacci, and monocle
- Handles keybinding configuration through a TOML-based config file without recompilation
Architecture Overview
LeftWM uses a unique architecture that splits the window manager into two processes: the core WM and the theme worker. The core process, written in Rust, handles all X11 window management through the x11rb library, managing layouts, focus, and tag assignment. The theme worker is a separate process (often a shell script or Polybar/Lemonbar instance) that reads the WM state and renders visual elements like status bars, borders, and backgrounds. This separation means the WM remains stable even if the theme crashes, and themes can be hot-swapped at runtime.
Self-Hosting & Configuration
- Configuration is stored in
~/.config/leftwm/config.tomlwith keybindings, workspaces, and layout options - Themes are installed in
~/.config/leftwm/themes/with a symlink pointing to the active theme - The
leftwm-themetool provides a community theme repository for browsing and installing themes - Layout behavior per tag can be configured independently, supporting different layouts on different workspaces
- Window rules can be defined in the config to assign specific applications to tags or set floating behavior
Key Features
- Crash-resistant architecture where theme failures cannot bring down the window manager core
- Hot-swappable themes that can be changed at runtime without restarting or losing window state
- Community theme repository with a dedicated
leftwm-themeCLI tool for easy installation - Multiple built-in layout algorithms with per-tag layout selection and customization
- Written in Rust for memory safety and performance with a focus on stability
Comparison with Similar Tools
- i3: Manual tiling WM with config file; LeftWM offers automatic tiling with separated theming
- bspwm: Tree-based tiling WM with external bar; LeftWM provides a similar separation but with built-in layout modes
- awesome: Lua-configurable tiling WM; LeftWM uses TOML config and separates themes from WM logic
- dwm: Source-configured tiling WM in C; LeftWM is configured via files and written in Rust for safety
- xmonad: Haskell tiling WM; LeftWM offers a simpler configuration model without requiring a programming language
FAQ
Q: Does LeftWM support Wayland? A: No, LeftWM is an X11 window manager. Wayland support is not currently planned.
Q: How do I install and change themes?
A: Use the leftwm-theme command-line tool to browse, install, and apply themes from the community repository.
Q: Can I use LeftWM with a floating layout? A: LeftWM is primarily a tiling window manager, but individual windows can be toggled to floating mode. A full floating layout mode is not the primary design goal.
Q: Does LeftWM support multi-monitor setups? A: Yes, LeftWM supports multiple monitors with separate tag sets and layout configurations per screen.
Sources
- Repository: https://github.com/leftwm/leftwm
- Documentation: https://leftwm.org/documentation/