Configs2026年5月21日·1 分钟阅读

Rectangle — Keyboard-Driven Window Management for macOS

An open-source macOS app that lets you move and resize windows using keyboard shortcuts, based on the discontinued Spectacle app.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Rectangle Overview
通用 CLI 安装命令
npx tokrepo install c37a131f-550f-11f1-9bc6-00163e2b0d79

Introduction

Rectangle is a free, open-source window manager for macOS that provides keyboard shortcuts and snap areas for tiling windows. It fills a gap in the macOS experience where native window management is limited to basic full-screen and split-view.

What Rectangle Does

  • Snaps windows to halves, thirds, quarters, and sixths of the screen
  • Provides customizable keyboard shortcuts for every window position
  • Supports drag-to-snap zones similar to Windows snap assist
  • Cycles through sizes when repeating the same shortcut
  • Works across multiple monitors with per-display positioning

Architecture Overview

Rectangle is a native Swift application that uses the macOS Accessibility API to read and manipulate window frames. It registers global hotkeys through Carbon event handlers and listens for mouse drag events near screen edges to trigger snap zones. Window positions are calculated relative to the visible screen frame, accounting for the menu bar and Dock.

Self-Hosting & Configuration

  • Install via Homebrew: brew install --cask rectangle or download from the website
  • Requires macOS 10.13 or later and Accessibility permissions
  • Customize shortcuts in the Preferences window or via a JSON config file
  • Export and import settings for consistent setups across machines
  • Enable or disable specific snap areas and repeated-execution cycling behavior

Key Features

  • Spectacle-compatible default shortcuts for easy migration
  • Todo mode that restricts windows to predefined layouts
  • Ignore list to exclude specific apps from management
  • Near-zero resource usage as a native Swift app
  • Rectangle Pro available as an optional paid upgrade with additional tiling features

Comparison with Similar Tools

  • Amethyst — Automatic tiling window manager; Rectangle is manual snap-based
  • Magnet — Paid Mac App Store app with similar snap functionality
  • Spectacle — The discontinued predecessor; Rectangle is its spiritual successor
  • Yabai — Scriptable tiling WM with more power but requires SIP configuration
  • BetterSnapTool — Paid alternative with custom snap regions

FAQ

Q: Is Rectangle truly free? A: Yes, Rectangle is free and open-source under the MIT license. Rectangle Pro is a separate paid product with additional features.

Q: Does Rectangle work with Stage Manager? A: Rectangle functions alongside Stage Manager, though some interactions may behave differently since Stage Manager changes how macOS handles window groups.

Q: Can I use Rectangle with multiple monitors? A: Yes. Shortcuts like next/previous display move windows between monitors, and snap zones work independently on each screen.

Q: What is the difference between Rectangle and Rectangle Pro? A: Rectangle Pro adds features like custom snap layouts, app-specific rules, window groups, and more granular control. The free version covers standard tiling shortcuts.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产