About this project

hana (花) is an early-development X11 window manager written in Zig, built around modularity, flexibility and comfortable configuration. It supports both dynamic tiling and floating window paradigms, and ships its own optional bar integrated into the WM. No feature beyond the core is strictly required: subsystems and their modules can be deleted from the source and the project recompiled into a different binary. Modularity is the stated top priority. Optional logic lives in its own files, and the core adapts to the presence or absence of subsystems through open contracts (Surfaces, WindowModule, Segment, Layout) and build-generated registries, so the core never imports an optional module by name. Deleting a module shortens an array rather than leaving stubs. Drop-in templates under dev/plugin-template/ cover new tiling layouts, window subsystems and bar segments, and are compiled against the contracts by zig build check. Window management features include tiling layouts (master-stack, monocle, grid, fibonacci, scroll, leaf, some with variants), per-window tiling/floating toggles and float rules, fullscreening and minimizing, workspaces with tagging and pinning, per-program and per-workspace window rules, and drag-and-drop placement with snapping. The bar offers widgets such as workspaces, title, layout indicators, clock, system status and volume/brightness sliders, plus a title carousel and an inline command prompt with vim-modal motions. Configuration uses TOML with hot-reloading, including binary hot-reload that preserves the existing X session. Config can be split across multiple files that are joined automatically; a functional config and swappable themes under config/themes/ are the default split. Bindings support glob expansion, ranged keys, multi-action arrays, mouse bindings and placeholder substitution. Scaling is DPI-aware. Session integration covers EWMH/ICCCM cooperation, window persistence across restarts, a clean re-exec, crash backtrace dumps on SIGUSR2, and monitor refresh-rate detection via RandR. Brightness control writes through sysfs when udev rules and video group membership are configured, otherwise falling back to a throttled brightnessctl subprocess. Build requirements are Zig 0.16.0, an X server, libxcb with randr/XKB extensions, xcb-util-cursor, xcb-util-keysyms, xkbcommon and xkbcommon-x11, plus cairo and pango/pangocairo. These are linked unconditionally, so development headers are needed even if the bar is removed. Installation is essentially zig build; distro package commands are given for Ubuntu/Debian, Arch and Fedora. Development tooling includes layer checks, a modularity matrix that builds each module in isolation, opt-in latency benchmarks, end-to-end X scenarios with golden snapshots under dev/harness/, and unit tests under src/test/. The README notes the project is in an early phase, with a stable main branch planned and bleeding-edge work on dev. A roadmap lists external bar support, a reversed ratio spelling, finer rule-driven window properties and per-monitor scaling polish as not yet shipped.