AeroSpace: Bringing i3-Style Tiling Window Management to macOS
Share this article
For developers accustomed to Linux tiling window managers like i3, macOS's native window management often feels restrictive. Enter AeroSpace, an open-source project that brings i3's efficiency and flexibility to Apple's ecosystem—while ingeniously bypassing macOS's notorious Spaces limitations.
The macOS Window Management Dilemma
Apple's Spaces and Mission Control suffer from inherent constraints:
"The animation for Spaces switching is slow... You have a limit of Spaces (up to 16)... Apple doesn’t provide public API to communicate with Spaces"
AeroSpace addresses these by implementing virtual "Workspaces" that hide inactive windows off-screen, avoiding Apple's API limitations entirely. This enables:
- Unlimited workspaces
- Instant workspace switching
- Programmatic window movement between workspaces
- CLI control viaaerospacebinary
Core Architecture: i3 Meets macOS
AeroSpace adopts i3's tree-based tiling model but adapts it for macOS quirks:
# Example workspace tree structure
Workspace → Container (layout: h_tiles)
├── Container (layout: v_accordion)
│ ├── Window (Alacritty)
│ └── Window (VSCode)
└── Window (Chrome)
Key features include:
1. Four Layout Modes: h_tiles/v_tiles (i3 splits) and h_accordion/v_accordion (tabbed/stacked equivalents)
2. Declarative TOML Config: Inheritable settings with environment variable support
3. Binding Modes: Context-aware keybindings (e.g., main vs. resize modes)
4. Window Detection Engine: Regex-based rules for auto-floating dialogs or assigning apps to workspaces
Navigating macOS Quirks
AeroSpace employs clever workarounds for macOS limitations:
- Hidden Windows: Minimizes off-screen windows to 1-pixel lines (user-recoverable if crashes occur)
- Monitor Arrangement: Requires bottom-right/left clearance for hidden windows
- Dialog Heuristics: Floats windows without fullscreen buttons (excluding terminals)
- Mission Control Fix: Recommends "Group windows by application" to improve previews
The project strongly advises disabling System Settings → Desktop & Dock → Displays have separate Spaces due to:
"Wrong window may receive focus... Performance issues... macOS randomly switches focus... Spaces are just cursed in macOS."
Advanced Automation
Developers can script behaviors using event-driven callbacks:
# Auto-move Slack to workspace 3
[[on-window-detected]]
if.app-id = "com.tinyspeck.slackmacgap"
run = "move-node-to-workspace 3"
# Mouse follows focus
[[on-focus-changed]]
run = "move-mouse-to-focused-window"
Supported triggers include workspace changes, window detection, and focus shifts—enabling complex automations like status bar integrations.
Why This Matters for Developers
AeroSpace represents more than convenience; it rethinks macOS workflow efficiency:
1. Config-as-Code: Version-controlled workspace setups
2. CLI Integration: Scriptable window management
3. Reduced Context Switching: Fluid workspace navigation sans animations
4. Escape Hatch: Recoverability from macOS's Spaces constraints
While requiring careful monitor arrangement and accepting minor UI compromises, AeroSpace delivers a robust tiling paradigm previously inaccessible on macOS. For power users wrestling with Apple's window management, it offers a meticulously engineered escape route—one TOML file at a time.
Source: AeroSpace Official Guide