How asmvik/yabai works
yabai is a macOS tiling window manager. A user issues commands through its CLI to manage windows, spaces, and displays; the core product also automatically tiles windows using binary space partitioning. The tree identifies the relevant runtime modules, while the README documents the capabilities. The supplied source index reports no imports or named repository-file references for the indexed files, so internal call paths are not established here; dashed, uncited links mark likely but unverified coordination. The documented scripting-addition integration is shown separately.
Main entry points: yabai.c yabai process · window_manager.c Window operations · space_manager.c Spaces · display_manager.c Displays
Components 20
Command and lifecycle
- CLI commands
src/message.c - yabai process
src/yabai.c - Launch service
src/misc/service.h
Window layout
- Window state
src/window.c - BSP layouts
src/view.c - Window rules
src/rule.c - Window operations
src/window_manager.c
Desktop management
- Spaces
src/space_manager.c - Space state
src/space.c - Displays
src/display_manager.c - Display state
src/display.c - Mission Control
src/mission_control.c
Events and integration
- Event loop
src/event_loop.c - Event signals
src/event_signal.c - Mouse behavior
src/mouse_handler.c - Process tracking
src/process_manager.c
Other components
- User
- skhd / shortcuts
- macOS window manager
- Scripting addition
src/osax/common.h
Connections 22
- User → CLI commands: issues commands
- skhd / shortcuts → CLI commands: sends shortcuts
- CLI commands → yabai process: controls
- yabai process → Launch service: manages service
- yabai process → Window operations: manages windows
- yabai process → Spaces: manages spaces
- yabai process → Displays: manages displays
- yabai process → Event loop: runs events
- Event loop → Event signals: handles signals
- Event loop → Process tracking: tracks processes
- Mouse behavior → Window operations: affects focus
- Window operations → Window state: operates on
- Window operations → BSP layouts: tiles windows
- Window operations → Window rules: applies rules
- Spaces → Space state: tracks spaces
- Spaces → BSP layouts: maintains layouts
- Displays → Display state: tracks displays
- Mission Control → Spaces: coordinates spaces
- Window operations → macOS window manager: controls windows
- Spaces → macOS window manager: controls spaces
- Displays → macOS window manager: controls displays
- yabai process → Scripting addition: optional integration