AIFeed

Show HN: A 300k-line Zig desktop environment with its own compositor,GUI toolkit

Original text(via Hacker News)
RediWM — One process. A whole desktop. A Wayland compositor with its shell and everyday apps built in, written in Zig.
RediWM — One process. A whole desktop. A Wayland compositor with its shell and everyday apps built in, written in Zig.

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.

1–2s

1 process

< 200 MB

< 1% CPU

RediWM theme showcase 1
RediWM theme showcase 1
RediWM theme showcase 3
RediWM theme showcase 3
RediWM theme showcase 2
RediWM theme showcase 2
RediWM theme showcase 4
RediWM theme showcase 4

Built-in apps

⚙️ Settings📁 File manager
🖼️ Image / PDF viewer📝 Text editor
System MonitorDock
RediWM Settings
RediWM Settings
RediWM file manager
RediWM file manager
RediWM image and PDF viewer
RediWM image and PDF viewer
RediWM text editor
RediWM text editor
RediWM image and PDF viewer
RediWM image and PDF viewer
RediWM text editor
RediWM text editor
Sharp on HiDPI Xwayland native scaling keeps X11 applications sharp on high-density displays.Lock / Login screen PAM-backed lock and login screens, with the optional rediwm-dm display manager.Your notifications A built-in notification daemon with actions, images and do-not-disturb rules.
Night light Adjust the display colour temperature with the built-in night light.Multi-monitor support Use multiple monitors in the same desktop session.Tiling / stacking layouts Arrange windows using tiling or stacking layouts.

Sharp on HiDPI

Lock / Login screen

Your notifications

Night light

Multi-monitor support

Tiling / 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.

🚀 Get RediWM

Linux installer

Arch and derivatives — including Artix and CachyOS — Debian, Ubuntu and Fedora:


        curl -fsSL https://rediwm.redios.org/install.sh | sh
      

Install the prebuilt release together with rediwm-dm:


        curl -fsSL https://rediwm.redios.org/install.sh | sh -s -- --dm
      

NixOS · x86_64

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
      

Build it yourself

Requires Zig 0.17, wlroots 0.20, and the development dependencies below.

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.

⌨️ Keyboard shortcuts

KeysAction
Super + SpaceOpen the centred app launcher
Super + T / E / BTerminal / Files / browser
Super + Q / F / MClose / fullscreen / maximise
Super + ← → ↑ ↓Slide to the neighbouring desktop
Super + Ctrl + arrowsFocus the window in that direction
Super + PToggle Panorama Mode
Alt + TabSwitch windows
Super + 1…5 or = / - / 0Zoom a window
Super + Shift + = / - / 0Zoom the desktop
Super + LLock the screen
Ctrl + Shift + S / PrintRegion / full-screen screenshot
Super + ZUndo the last window move or resize
Super + Shift + EQuit RediWM

Canvas bindings live in [keybinds]; set one to "noop" to disable it.

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.

[theme] · [input] · [input_method] · [compositor] · [region] · [idle] · [night_light] · [notifications] · [desktop] · [polkit] · [ipc] · and more.

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.

🔌 Scriptable

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-<WAYLAND_DISPLAY>.sock, or the path specified by REDIWM_SOCKET, in a private directory only. The protocol reference is src/ipc/protocol.zig.

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.

📚 Docs

ExploreWhat is inside
SecuritySecurity boundaries and design decisions
TestingUnit and headless integration tests
Installation and packagingCustom prefixes and distribution packages
NixOSFlake and NixOS module
D-Bus transportD-Bus integration
Polkit agentPolkit integration
IPC protocolCommand and message reference

Credits

Typography by Manrope and JetBrains Mono (SIL OFL 1.1). Cursors by phinger-cursors (CC BY-SA 4.0).

License

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.

One process. Your whole desktop.

RediWM · Built in Zig · Powered by wlroots

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Hacker News
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗