How konosubakonoakua/zig-river works
Main Components
a) Core Compositor (River)
• Key components visible in the /river directory:
• Server.zig (central component)
• Input Management (InputManager.zig, InputDevice.zig)
• View Management (View.zig, XdgToplevel.zig)
• Layout System (Layout.zig, LayoutManager.zig)
• Output Management (Output.zig)
b) Protocol Layer
• This as a foundation layer below the core
• Custom protocols from the /protocol directory:
• river-control-unstable-v1
• river-layout-v3
• river-status-unstable-v1
• wlr-layer-shell-unstable-v1
c) External Components
• Layout Generators (rivertile)
• Control Interface (riverctl)
• Client Applications
Component Relationships
• Wayland protocol communication between components
• Layout generator protocol interaction
• Control command flow from riverctl to the compositor
• Window management flow
Specific Implementation Details
a) Layout System Architecture
riverctl <-> River Core <-> Layout Generator (rivertile)
b) Input Management Chain
Input Devices -> InputManager -> InputRelay -> Views/Windows
c) Window Management Flow
Client Windows -> XdgToplevel/XwaylandView -> View Management -> Layout System
Important Notes
• A note about the future architectural changes mentioned in the README
• Modular nature of the layout generator system
• Configuration flow from init script through riverctl
• Xwayland support (when enabled)