Repository navigation
Development
This guide covers building minfwm from source, running tests, and developing locally.
- macOS 14 (Sonoma) or newer
- Xcode Command Line Tools (AppleClang with C++20 support)
- CMake 3.20 or newer
Clone the repository and build using CMake:
cmake -S . -B build -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
cmake --build build --parallelThe compiled binary will be placed at ./build/minfwm.
minfwm includes a test suite powered by CTest. Run all automated tests with:
ctest --test-dir build --output-on-failureYou can build and run individual test suites for faster development iterations:
| Area | Build Target | Run Command |
|---|---|---|
| Core Geometry & Snap | cmake --build build --target minfwm_geometry_tests |
ctest --test-dir build -R geometry |
| IPC & Protocol | cmake --build build --target minfwm_ipc_tests |
ctest --test-dir build -R ipc |
| Yabai SA Integration | cmake --build build --target minfwm_yabai_sa_tests |
ctest --test-dir build -R yabai |
When making changes to the daemon or CLI, use the built-in dev-update command:
./build/minfwm dev-updateTo follow the daemon log after the update, pass --attach:
./build/minfwm dev-update --attachAttach prints the most recent 20 log lines and follows new output. Press Ctrl-C
to detach from the log; the daemon continues running.
What dev-update does:
- Rebuilds the
minfwmbinary in yourbuilddirectory. - Captures and saves your current window positions and camera locations.
- Gracefully restarts the running daemon.
- Restores all windows and cameras back to where they were.
This allows seamless code iterations without having windows scatter across your screen on every rebuild.
- C++ Standard: C++20.
- Indentation: 4 spaces, no tabs.
-
Naming:
PascalCasefor types and classes,lowerCamelCasefor functions and methods, andm_prefix for private member variables. -
Architecture: Keep pure math and geometry algorithms in
src/core/; keep macOS and AppKit API interactions strictly withinsrc/daemon/. - Manual Verification: Since Accessibility, WindowServer, and trackpad gestures interact with the live operating system, see docs/Acceptance-macos.md for manual verification steps.
For developers troubleshooting drag and resize behavior, see docs/Window-Interaction-Diagnostics.md for interaction tracing and sampled geometry logs.