Show HN: A 300k-line Zig desktop environment with its own compositor,GUI toolkit
RediWM is a wlroots Wayland compositor that draws its entire desktop shell in one process: taskbar, start menu, settings, lock and login screens, notifications and on-screen displays.
No separate bar to configure. No launcher to bolt on. No notification daemon to wire up. Just one desktop, built together.
Wayland_Compositor_Showcase.mp4 | From start to desktop | Compositor + desktop shell | Idle RAM usage | Idle CPU usage | | โ๏ธ Settings | ๐ File manager | |---|---| | ๐ผ๏ธ Image / PDF viewer | ๐ Text editor | | System Monitor | Dock |
Features
- Xwayland native scaling keeps X11 applications sharp on high-density displays.
- PAM-backed lock and login screens, with the optional
rediwm-dmdisplay manager. - A built-in notification daemon with actions, images and do-not-disturb rules.
- Adjust the display colour temperature with the built-in night light.
- Use multiple monitors in the same desktop session.
- Arrange windows using tiling or stacking layouts.
Built-in shell and apps
Taskbar, start menu, desktop icons, settings, file manager, image/PDF viewer and text editor. No separate Waybar, greeter, launcher or notification daemon is required.
Wayland tools
Works with wlr-randr, kanshi, swaylock, swayidle, grim, wf-recorder, wayvnc and docks.
Installation
Arch and derivatives - including Artix and CachyOS - Debian, Ubuntu and Fedora:
curl -fsSL https://rediwm.redios.org/install.sh | sh
๐ Include the optional RediWM display manager
Install the prebuilt release together with rediwm-dm:
curl -fsSL https://rediwm.redios.org/install.sh | sh -s -- --dm
Use the flake and NixOS module, not the shell installer above. To build just the package, without configuring a login session:
nix build github:oxydizer/rediwm
Requires Zig 0.17, wlroots 0.20, and the development dependencies below.
๐ฆ Full dependency list
Wayland, wayland-protocols, xkbcommon, libxcb (including xcb-xinput), pixman, FreeType, HarfBuzz, Fontconfig, librsvg/GdkPixbuf, PangoCairo, libinput, PAM, libpulse, libpipewire-0.3, Poppler GLib, libarchive, libjpeg, libpng, libwebp and GNU Readline.
# Try it nested inside your current Wayland session
zig build run -- foot
# Build for daily use and measurements
zig build -Doptimize=ReleaseSafe
# Install the session and restart the running session
sh scripts/install-session.sh
# Or install without restarting, including rediwm-dm
sh scripts/install-session.sh --no-restart --dm
For custom prefixes and distribution packages, see Installation layouts and packaging.
Keybindings
| Keys | Action |
|---|---|
| Super + Space | Open the centred app launcher |
| Super + T / E / B | Terminal / Files / browser |
| Super + Q / F / M | Close / fullscreen / maximise |
| Super + โ โ โ โ | Slide to the neighbouring desktop |
| Super + Ctrl + arrows | Focus the window in that direction |
| Super + P | Toggle Panorama Mode |
| Alt + Tab | Switch windows |
| Super + 1โฆ5 or = / - / 0 | Zoom a window |
| Super + Shift + = / - / 0 | Zoom the desktop |
| Super + L | Lock the screen |
| Ctrl + Shift + S / Print | Region / full-screen screenshot |
| Super + Z | Undo the last window move or resize |
| Super + Shift + E | Quit RediWM |
Canvas bindings live in [keybinds]; set one to noop to disable it.
Panorama Mode
Panorama works with every Desktop mode and opens on the focused display.
Side workspaces are laid out in a narrower box with the proportions of their pane, so their windows are not squeezed: tiled and maximized windows there are resized to fit it, and resized back when they return to the center. Floating windows keep their size.
Move the pointer toward the outside edge of a side pane to turn it toward you for reading: it grows to the full height in the same proportions. At the edge, the pane becomes rectangular and stays that way until the pointer leaves it.
Use windows directly in all three panes. Drag a window by its titlebar into a side pane to maximize it there. Super+Left/Right changes the center workspace.
In Settings โ Desktop โ Panorama Mode, adjust Perspective angle, Peripheral width, Peripheral height, Overall height, and Pane zoom.
By default, the outer edges of the side panes grow 40% of the way to the full perspective height. The other defaults are 65% perspective, 22% of the available width per side, 90% overall vertical scale, and 110% zoom in all three panes.
Zoom keeps the top and right edges in view for window controls.
Configuration
$XDG_CONFIG_HOME/rediwm/config.toml
RediWM writes commented defaults on first run and reloads on save. A parse error keeps the previous configuration active. Set REDIWM_CONFIG to override the path.
๐๏ธ Configuration sections [theme] ยท [input] ยท [input_method] ยท [compositor] ยท [region] ยท [idle] ยท [night_light] ยท [notifications] ยท [desktop] ยท [polkit] ยท [ipc] ยท and more.
Per-window rules and a Picture-in-Picture example
Window rules match by globs. For each property, the last matching rule wins.
[[window_rules]]
app_id = ["firefox", "chromium"]
title = "*Picture-in-Picture*"
opacity = 0.9
skip_taskbar = true
focus = false
Matchers: app_id, title, x11_class, x11_instance, backend, dialog and exclude_*. Properties: output, x, y, center, width, height, maximized, fullscreen, focus, depth, opacity, decorations and skip_taskbar.
IPC
Use rediwm-msg to talk to RediWM's JSON IPC:
rediwm-msg outputs
rediwm-msg output-config DP-1 --scale 1.5
rediwm-msg notifications
The socket is $XDG_RUNTIME_DIR/rediwm-.sock, or the path specified by REDIWM_SOCKET, in a private directory only. The protocol reference is src/ipc/protocol.zig.
Wire format and request examples
IPC v1 is UTF-8 JSON, with one request and one response per newline. Every request uses the envelope below; command names are case-sensitive snake_case.
{"version":1,"id":1,"command":"windows"}
{"version":1,"id":2,"command":"move_cursor","params":{"x":100,"y":200}}
Automation is opt-in. Synthetic input and pixel reads require automation = true in [ipc], or REDIWM_IPC_AUTOMATION=1. All IPC requests are refused while locked.
Explore
| Explore | What is inside |
|---|---|
| Security | Security boundaries and design decisions |
| Testing | Unit and headless integration tests |
| Installation and packaging | Custom prefixes and distribution packages |
| NixOS | Flake and NixOS module |
| D-Bus transport | D-Bus integration |
| Polkit agent | Polkit integration |
| IPC protocol | Command and message reference |
Typography by Manrope and JetBrains Mono (SIL OFL 1.1). Cursors by phinger-cursors (CC BY-SA 4.0).
RediWM's own code is dual-licensed under either the Apache License, Version 2.0 or the MIT License. Bundled third-party assets retain their own licenses: fonts in assets/fonts under SIL OFL 1.1, and cursors in assets/cursors under CC BY-SA 4.0.
Comments
No comments yet. Start the discussion.