
Wrangler – Open-Source macOS Window Manager (Swift, Grid HUD, Auto-Tiling)
Native macOS window organizer combining interactive grid snapping, edge drop zones, and automated tiling.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Native macOS window organizer combining interactive grid snapping, edge drop zones, and automated tiling.
Download DMG • Quickstart • Features • Shortcuts • Changelog
Most macOS window managers force a choice between two extremes:
Wrangler bridges this gap. It provides a visual HUD grid for fast manual adjustments, Snap Zones for drag-and-drop ultrawide workflows, and one-key Auto-Tiling using recursive Binary Space Partitioning—all running within standard macOS Accessibility APIs with zero system security compromises.
Homebrew (Recommended)
brew install mezzie/tap/wrangler
Direct Download
Download Wrangler.dmg.
Drag Wrangler into your /Applications directory.
Open Wrangler and grant Accessibility permissions when prompted in System Settings → Privacy & Security → Accessibility.
Build from Source
git clone https://github.com/mezzie/wrangler.git cd wrangler ./scripts/build-app.sh open build/Wrangler.app
Features
Interactive Grid Overlay (⌥ Space)
Summons a floating HUD directly at your cursor location. Click and drag across the cells to draw an exact destination frame. A translucent blueprint previews the snap location in real time before you release the mouse.
Drag any window by its title bar to screen edges or corners to trigger template layouts tailored for ultrawide displays:
Organizes all visible, non-minimized windows on the active display into a balanced Binary Space Partitioning (BSP) tree. Automatically scales windows to eliminate overlap while keeping the active application focused.
Transfer windows across monitors instantly while preserving proportional dimensions:
Directional presets cycle width ratios on repeated presses (e.g., Left Half cycles between 1/2, 2/3, and 1/3 widths).
Detects whether macOS Stage Manager thumbnails are visible and dynamically adjusts margins so windows never cover the stage strip.
Periodically checks GitHub Releases for new updates. Allows one-click in-place upgrading and restarting without Terminal commands.
Shortcut Action Description
⌥ Space Grid Overlay Opens interactive grid HUD at mouse cursor
⌃ ⌥ ↵ or ⌃ ⌥ M Maximize Expands focused window to full visible screen
⌃ ⌥ T Auto-Tile Organizes open windows into a non-overlapping BSP tree
⌃ ⌥ → Next Screen Shifts focused window to the next connected display
⌃ ⌥ ← Prev Screen Shifts focused window to the previous connected display
⌥ ⌘ Z Undo Restores window to its coordinates before the last snap
⌘ , Preferences Opens settings for grid sizes, margins, templates, and languages
ESC Cancel Closes overlay without moving windows
All shortcuts can be customized in Preferences → Shortcuts using the interactive key recorder.
Wrangler features a multi-section sidebar settings window (⌘ ,):
Wrangler includes a standalone headless CLI (wrangler-cli):
Authorization check
swift run wrangler-cli check-perm
List connected displays and geometry
swift run wrangler-cli screens
Inspect frontmost target window
swift run wrangler-cli target
Snap focused window to standard presets
swift run wrangler-cli snap left-half swift run wrangler-cli snap right-half swift run wrangler-cli snap full swift run wrangler-cli snap center
Snap to custom grid coordinates: <cols> <rows> <startCol> <startRow> <endCol> <endRow>
swift run wrangler-cli custom 4 4 0 0 1 2
Architecture
Sources/ ├── WranglerCore/ # Core logic engine │ ├── Accessibility/ # AXUIElement abstractions and Z-order detection │ ├── Display/ # NSScreen geometry, Stage Manager offsets, and display mapping │ ├── Geometry/ # Grid coordinate mathematics and gap resolution │ ├── History/ # Thread-safe undo and restore stack │ ├── Hotkey/ # Key code mappings and shortcut data models │ ├── Layout/ # AppSettings persistence and presets │ ├── SnapZones/ # Edge-drag hit testing and template resolution │ └── Tiling/ # Recursive Binary Space Partitioning (BSP) auto-tile engine │ └── WranglerApp/ # Native macOS Application ├── AppDelegate.swift # Application lifecycle and status item initialization ├── Hotkey/ # Carbon global event hotkey manager ├── Launch/ # ServiceManagement login item service ├── MenuBar/ # Menu bar controller and actions ├── Overlay/ # Floating glass HUD panel and AppKit canvas ├── Preferences/ # Sidebar preferences window and key recorder ├── Preview/ # Real-time ghost target blueprint panel ├── SnapZones/ # Global mouse drag monitor and drop handler └── Update/ # GitHub Releases checker and auto-installer
Development
Run the automated test suite:
swift test
Build the release .app bundle:
./scripts/build-app.sh
Package the release .dmg:
./scripts/create-dmg.sh 1.5.0
License
Distributed under the MIT License. See CHANGELOG.md for version release notes.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。