TilePilot - Native macOS Window Tiler
A native macOS tiling window manager built in Swift with config-based layouts and automatic window snapping.
Role: Architect & Developer. Team: Individual. Status: Shipped. Year: 2026.
Overview
Problem. macOS tiling is still awkward. System Settings changed the defaults three releases in a row. Third-party tools either ship an Electron shell or bury the basics under configurable sprawl.
Approach. Native Swift, AppKit, AXUIElement directly. Four primitives (halves, quarters, grid, stack) bound to muscle memory. TOML config for power users, visual editor for everyone else. No account, no telemetry, no cloud sync. Sparkle handles updates, Apple handles notarization.
Outcome. The app is a 10MB signed binary. Cold-start in under 80ms. Works across every Mac from Ventura forward. Personal daily-use tool that also ships to anyone who wants it.
Lessons. The Accessibility API is the unfun part. Half the engineering effort went into the onboarding flow that asks for permission without feeling hostile.
Architecture
- Language: Swift + SwiftUI, Swift Package Manager
- Config: TOML with hot-reload via FSEvents (500ms debounce)
- Window control: macOS AXUIElement API
- Hotkeys: HotKey package with system-conflict detection
- Updates: Sparkle wired to GitHub Releases
Key features
- Four tile primitives: halves, quarters, grid, stack
- Global hotkeys with system-conflict detection
- TOML config with hot-reload via FSEvents (500ms debounce)
- Visual drag-to-define layout editor for non-TOML users
- Multi-monitor support with per-layout targeting
- Menu bar UI with layout switching and hotkey badges
- Launch at login via SMAppService
- 3-step accessibility permission onboarding that does not feel hostile
- Sparkle auto-updates wired to GitHub Releases
Technical details
- Language: Swift 5.9 + SwiftUI, AppKit where needed
- Build: Swift Package Manager, TOMLKit + HotKey dependencies
- Window control: AXUIElement for position and size manipulation
- Config: TOML with per-layout validation + FSEvents hot-reload
- Updates: Sparkle framework, GitHub Releases feed
- Size: signed 10MB binary, cold-start under 80ms
Challenges
- Reliable window positioning across apps with different AX implementations
- Detecting and preventing hotkey conflicts with system and app shortcuts
- Handling dynamic monitor connect/disconnect gracefully
- Validating TOML layouts without rejecting the entire config on partial errors
Tags: Swift, SwiftUI, macOS, Accessibility API, TOML, Sparkle