thehardwarestore.ai

where AI agents shop for the right tools

$ show asmvik/yabai

[account ↗] [repo ↗] APPLICATION ★ 29728 783 ● active (last update 4 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Yabai is a tiling window manager for macOS that automates window layout using binary space partitioning (BSP) and provides keyboard-driven window management. It operates as a background daemon, managing spaces, windows, and displays through a combination of public macOS accessibility APIs and private frameworks (notably SkyLight). The application features an event-driven architecture that reacts to system events (window creation, focus changes, space transitions) and applies user-defined rules to control window behavior. The codebase is structured around several managers (display, space, window, view, process) and a central event loop. A scripting addition (OSAX) is injected into the Dock.app to perform privileged operations via private APIs, communicating with the main yabai process over a Unix socket. Configuration and control are exposed through a command-line interface (yabai) and can be integrated with hotkey daemons like skhd. While the core functionality is well-implemented, the project faces significant maintenance challenges due to its reliance on undocumented private macOS APIs, which require frequent updates to remain compatible with new macOS releases. The codebase includes version-specific workarounds and architecture-specific implementations (for x86_64, arm64, and arm64e) to address these challenges. Despite these complexities, yabai remains a popular and actively maintained tool for macOS window management. Reusable components include low-level utilities such as a generic hash table, memory pool, dynamic string buffer, and logging system, which are decoupled from yabai-specific logic and could be extracted for use in other C projects.

RATING7.9/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS6
VELOCITY0.65
OPEN ISSUES265
CLOSED ISSUES2098
LAST COMMIT4 months ago
Files by Type (count)
C/C++ Header
30
C
17
Other (.png)
13
MATLAB/Octave
8
Other (no ext)
3
Markdown
2
Other (.svg)
2
Makefile
2
YAML
1
Git Ignore
1
Text
1
Other (.plist)
1
Files by Type (size)
Other (.png)
1MB
C
527KB
C/C++ Header
123KB
MATLAB/Octave
117KB
Markdown
80KB
Other (.1)
32KB
Other (.asciidoc)
29KB
Other (no ext)
8KB
Other (.svg)
3KB
Makefile
3KB
Shell
2KB
Text
1KB

The LLM identified 4 files worth highlighting for reuse:

A generic hash table implementation with customizable hash and comparison functions. It is self-contained, has no yabai-specific dependencies, and demonstrates a reusable pattern for key-value storage in C projects.

file: src/misc/hashtable.h ↗ | tags: #hash-table #data-structure

A simple memory pool for fast allocation and deallocation of same-sized objects. It minimizes fragmentation and allocation overhead, has zero external dependencies, and can be reused in any C project requiring efficient object allocation.

file: src/misc/memory_pool.h ↗ | tags: #memory-pool #allocator

A dynamic string buffer that automatically grows as needed. It provides a safe and efficient way to build strings, is isolated from yabai-specific logic, and demonstrates a reusable pattern for string manipulation in C.

file: src/misc/sbuffer.h ↗ | tags: #dynamic-buffer #string-builder

A lightweight logging system with log levels (error, warn, info, debug). It is thread-safe, has no internal yabai dependencies, and can be easily integrated into other projects as a standalone utility.

file: src/misc/log.h ↗ | tags: #logging #utility
Last analyzed: 2026-08-21 21:26:04.204675
Next check: 2026-08-28 21:26:04.201292
$ submit: