Skip to content

Architecture

Wiktor edited this page Oct 16, 2026 · 1 revision

Architecture

flowchart LR
    H[Hyprland] -- layer-shell --> UI["mist-ui<br/>tiny-skia + swash<br/>wl_shm, every surface"]
    H -- layer-shell --> W["mist-wall<br/>EGL / GLSL 150<br/>live wallpapers, sky"]
    UI <-- "stdin / stdout" --> D["mistd<br/>stats, phone, calls,<br/>island, clipstore, data"]
    UI <-- D-Bus --> S[(MPRIS, tray, notifications,<br/>polkit, NetworkManager, BlueZ)]
    CLI["mist-ui-bin msg"] -. Unix socket .-> UI
Loading

Processes

Process Role GPU
mist-ui (guard) shell script: restarts mist-ui-bin after a crash, gives up after 5 in 2 min
mist-ui-bin every surface: bar, dock, island, desktop, panels, lock, notifications, polkit, tray, idle, snap assist; Mist Files and Mist Player run as mist-ui-bin files / player no (the player uses an EGL subsurface for video)
mist-wall-bin live wallpaper and weather sky; exits with a photo wallpaper yes, the only one
mistd <mode> backends, one binary: stats, phone, calls, island, data (weather, Garmin, calendar), geo, tiles (dock icons), clipstore / cliplist, notify, notifimg no

Code map: native/README.md.

Rules the code follows

  • CPU drawing into wl_shm. No GL context in the shell process, so no per-process GPU driver memory (on NVIDIA an empty Qt Quick window already costs 124 MB PSS).
  • Event-driven. The loop sleeps until Wayland, D-Bus, a backend or a timer wakes it; surfaces repaint only when something they show changed. mist-ui-bin msg ui stats counts wake-ups and paints.
  • Nothing per frame when hidden. Occluded or closed surfaces do no work; animations stop at rest.
  • One GL process at most. Only mist-wall, and only with a live scene.
  • Backends out of process. Slow or crash-prone work (ADB, HTTP, system stats) lives in mistd, talking JSON lines over stdin / stdout. On a failure mistd returns the last good cache.

Numbers

On the author's machine (2 × 1920×1080, NVIDIA), idle: the whole shell 87 to 106 MB PSS, about 0.6 % of one core; mist-ui alone 36 to 50 MB. The old QML version used 428 MB and 9.5 %. Method and other shells: docs/BENCHMARKS.md.

Hyprland integration

Plain wlr-layer-shell surfaces with namespaces mist-*, so Hyprland's layer rules blur them. hyprland_toplevel_export_v1 gives the dock its window thumbnails; Hyprland's socket gives windows, workspaces and monitors.

mist-comp is an experimental Smithay compositor with its own session and greeter, for running Mist without Hyprland.

Clone this wiki locally