How hyprwm/hyprland works
Hyprland is an independent Wayland compositor. Its principal workflow handles device input and keybinds, manages windows and workspaces through layout and rule systems, then renders desktop output to monitors. Configuration and IPC provide customization and control; plugins and the built-in plugin manager extend the compositor. The tree also contains hyprctl and hyprtester utilities. Some connections below are documented capabilities or inferred from module structure rather than shown call sites; those are marked dashed with no evidence path.
Main entry points: Renderer.hpp Rendering · InputManager.cpp Input manager · main.cpp Compositor entry · LayoutManager.cpp Layout algorithms
Components 21
Compositor runtime
- Compositor entry
src/main.cpp - Compositor core
src/Compositor.hpp
Desktop management
- Layout algorithms
src/layout/LayoutManager.cpp - Workspace placement
src/state/workspace/PlacementController.cpp - Window and layer rules
src/desktop/rule/Engine.cpp - Window state
src/desktop/view/window/Window.cpp
Input and output
- Keybind manager
src/keybinds/Manager.cpp - Input manager
src/managers/input/InputManager.cpp - Wayland seat
src/managers/SeatManager.hpp - Monitor management
src/output/Monitor.hpp - Rendering
src/render/Renderer.hpp - Animations
src/animation/AnimationManager.cpp
Configuration and control
- Configuration
src/config/ConfigManager.cpp - Config watcher
src/config/shared/inotify/ConfigWatcher.cpp - Lua customization
src/config/lua/ConfigManager.cpp - Socket IPC
src/ipc/s1/S1.cpp
Extensions and tools
- Plugin manager
hyprpm/src/core/PluginManager.cpp - Control client
hyprctl/src/main.cpp - Protocol test clients
hyprtester/clients - Plugin support
hyprtester/plugin/src/main.cpp
Other components
- Desktop user
Connections 17
- Desktop user → Compositor entry: starts session
- Compositor entry → Compositor core: initializes
src/main.cpp - Config watcher → Configuration: reloads
- Configuration → Lua customization: supports customization
- Desktop user → Socket IPC: sends commands
- Control client → Socket IPC: controls over socket
- Input manager → Keybind manager: dispatches input
src/keybinds/Manager.cpp - Input manager → Wayland seat: forwards events
src/managers/input/InputManager.cpp - Keybind manager → Layout algorithms: invokes actions
src/keybinds/Manager.cpp - Layout algorithms → Workspace placement: arranges workspaces
- Workspace placement → Window state: assigns windows
src/state/workspace/PlacementController.cpp - Window and layer rules → Window state: applies window rules
- Monitor management → Rendering: provides outputs
src/render/Renderer.hpp - Rendering → Monitor management: renders frames
src/render/Renderer.hpp - Animations → Rendering: damages output
src/animation/AnimationManager.cpp - Plugin manager → Plugin support: manages plugins
- Protocol test clients → Compositor core: tests protocols