Skip to content
AI SI Daily
中文

Search the site

↑↓ Select · Enter Open · Esc Close

○ Overview

Rectangle for Mac: Overview, Capabilities, and Setup Guide

An introductory guide to Rectangle, an open-source macOS window management application featuring keyboard shortcuts, snap areas, and grid tiling.

AI SI Daily Editors
This is an overview compiled from the official website, documentation and GitHub README. We have not tested it ourselves. Features and pricing are subject to the official pages; sources are listed at the end.

What it is

Rectangle is an open-source window management application built specifically for macOS. In desktop operating systems, window management refers to organizing, resizing, and arranging open application windows across one or more screens so that users can view multiple tools side by side without having to resize borders manually.

According to the project README, Rectangle is based on the legacy Spectacle utility and functions as a modern drop-in replacement. It offers users the choice to adopt Spectacle’s default shortcut layout during initial setup, while updating the underlying architecture. Instead of relying on a custom shortcut recording system, Rectangle uses a fork of the MASShortcut library to capture hotkeys. It also incorporates the Sparkle framework to handle app updates and stores user settings using standard macOS preference files (property lists or .plist files).

In addition to replicating core Spectacle functionality, Rectangle expands on it with several additional window actions. These capabilities include shifting windows to screen boundaries without altering their dimensions, maximizing only the vertical height of a window, and triggering an almost-maximized layout that preserves a margin around the screen. Furthermore, Rectangle provides explicit commands for display thirds that adjust automatically based on screen orientation (landscape versus portrait), allows windows to traverse across multiple connected displays upon repeated triggers, and introduces drag-and-drop snap areas that can be enabled or disabled according to user preference.

What it can do

Rectangle offers a broad set of features designed to handle window placement via keyboard shortcuts, mouse gestures, and scriptable commands.

Snap Areas and Drag Actions

Users can position windows by dragging them to various edges and corners of the display. When the mouse cursor reaches a display boundary, Rectangle generates an outline footprint indicating where and how the window will be resized once released:

  • Left or right edge: Snaps the window to the respective left or right half of the display.
  • Top edge: Maximizes the window across the screen.
  • Display corners: Places the window into the corresponding quarter in that specific corner.
  • Left or right edge just above or below a corner: Snaps the window into a top or bottom half.
  • Bottom thirds: Dragging to the bottom left, bottom center, or bottom right positions the window into that respective third. Dragging from an outer bottom third toward the center expands the window across the first or last two-thirds of the screen.

According to the project README, the settings menu includes options to enable an experimental window animation mode for smooth transitions, as well as a blurred preview footprint. Dragging a snapped window begins restoring it to its previous size as movement starts, and double-clicking a window’s title bar follows the same maximize and restore animation rules.

Tiling in Rows and Columns

Rectangle includes dedicated multi-window tiling actions that arrange open windows in rows or columns on the active display. The tiling engine targets standard windows located in the current Space on whichever display contains the focused window, or on the display under the pointer if no window is active. Rows are arranged vertically from top to bottom, while columns run horizontally from left to right, using each window’s top-left coordinates prior to movement to decide layout order.

Triggering the tiling command repeatedly cycles through balanced grid configurations. The maximum number of windows allowed per row and per column defaults to three, and both limits can be independently adjusted in preferences. Windows are balanced across available rows or columns without leaving deliberately empty cells. Tiling layouts respect system areas like the macOS menu bar and Dock, user-configured screen gaps, and sidebar reservations (such as those used by the Todo window). If multi-monitor setups have disabled the macOS option “Displays have separate Spaces” and enabled Rectangle’s combined-display mode, rows and columns can tile across the unified multi-screen area.

Managing Stacked Windows

When several windows share identical coordinates—such as three applications snapped to the same half of a monitor—only the frontmost window is visible. Rectangle provides dedicated actions to cycle forward and backward through stacked windows. A window is considered part of the stack if it shares the focused window’s position or is offset according to an overlap setting. An optional preference allows users to restrict cycling strictly to windows of the exact same dimensions (within a 24-point margin). Triggering the action brings background windows forward in order, emitting an alert beep if no other windows share the stack.

Mouse Button Shortcuts and App Exclusion

Window management commands can be assigned to mouse buttons rather than keyboard keys, making use of middle clicks or extra peripheral side buttons. Users can combine mouse button clicks with keyboard modifier keys (Command, Option, Control, and Shift). By default, mouse button shortcuts act on the focused window, but a setting allows them to target the window directly beneath the mouse pointer instead.

To avoid hotkey conflicts in specialized programs, Rectangle lets users ignore specific applications. When an ignored application is frontmost, Rectangle unregisters its shortcuts from macOS, automatically re-registering them as soon as the user switches away.

URL Commands and Automation

Rectangle features a custom URL scheme that allows users to trigger window actions programmatically from terminal shells, scripts, or launchers:

open -g "rectangle://execute-action?name=left-half"

Actions can also ignore or un-ignore specific applications via URL, optionally targeting an application by its bundle identifier.

Known Behaviors and Workarounds

The project README notes several specific behaviors and system constraints:

  • Desktops and Spaces: Standard Rectangle cannot move windows across different macOS Desktops or Spaces because Apple does not provide a public API for this functionality.
  • Minimum Window Sizes: If an application enforces a minimum window size larger than a requested layout (such as a compact third), Rectangle displays a temporary “Minimum window size reached” notification and avoids forcing an unsupported dimension.
  • Terminal Resizing: Certain programs, such as iTerm2, restrict resizing increments to character cell widths by default. The documentation notes that this behavior can be adjusted using the following command:
defaults write com.googlecode.iterm2 DisableWindowSizeSnap -integer 1
  • Notification Center: If a user experiences an issue where the macOS Notification Center freezes during drag snapping, the README advises disabling the “Snap windows by dragging” option.

How to get started

Getting started with Rectangle involves downloading the app, enabling the necessary system permissions, and setting up initial shortcuts.

Installation

Users can download the application disk image (.dmg) directly from the official website or the GitHub Releases page. Alternatively, it can be installed via Homebrew cask:

brew install --cask rectangle

Accessibility Permissions

Because macOS restricts third-party applications from controlling other windows, Rectangle requires macOS Accessibility permissions to function. On first launch, the application prompts users to grant access in: System Settings > Privacy & Security > Accessibility

According to the project documentation, if permissions fail to register properly after a macOS update, the permission database can be reset using the terminal:

tccutil reset All com.knollsoft.Rectangle

Alternatively, users can resolve permission issues manually by quitting Rectangle, removing it from the Accessibility list in System Settings with the minus button, restarting the Mac, and relaunching the application to re-enable permissions when prompted.

Basic Configuration

Upon first opening Rectangle, users can select between standard Rectangle shortcuts or Spectacle’s traditional keybindings. Windows can then be snapped immediately by dragging them to screen boundaries or pressing assigned keyboard combinations.

Preferences and custom hotkeys can be exported and imported as a JSON file through the settings pane. Rectangle also looks for a configuration file located at ~/Library/Application Support/Rectangle/RectangleConfig.json upon launch, renaming it with a timestamp once loaded so it is not repeatedly parsed. For diagnosing potential issues, debug logs can be viewed by holding the Option (alt) key while opening the Rectangle menu and choosing “View Logging…”.

Uninstallation

Rectangle can be removed by quitting the application and moving it to the macOS Trash. To remove stored configuration preferences from the machine, run:

defaults delete com.knollsoft.Rectangle

If the app was installed via Homebrew, the documentation recommends including the --zap flag during uninstallation to remove associated preference files:

brew uninstall --zap rectangle

According to the README, if configuration settings ever fail to persist after relaunching on a Homebrew installation, uninstalling with --zap and running brew install rectangle resolves the issue.

Pricing and requirements

System Requirements

According to the project documentation:

  • The current release of Rectangle supports macOS version 14 and newer.
  • Systems running macOS 10.15 through macOS 13 are supported via release v1.100.
  • Legacy systems on macOS 10.13 and 10.14 are supported via release v0.73.
  • The application runs on both Apple Silicon and Intel hardware.

Pricing

Rectangle is described as a free and open-source application on its official website. The project creator also develops a separate commercial variant known as Rectangle Pro, which offers an extended trial and additional features like Space switching. All pricing, tier details, and plans are subject to the official page.

Who it is for

Rectangle is built for macOS users seeking organized workspace management:

  • Multitaskers: Users managing multiple documents, web browsers, or development tools who need side-by-side or partitioned window layouts.
  • Former Spectacle Users: People who relied on the discontinued Spectacle utility and want a modern replacement that retains their established keyboard shortcuts.
  • Keyboard-Focused Users: Individuals who prefer navigating and managing their entire desktop layout via hotkeys without moving their hands to a mouse.
  • Mouse and Trackpad Navigators: Users familiar with Windows-style snap areas who want visual snap previews and drag-to-edge functionality on macOS.
  • Multi-Monitor and Ultrawide Users: Workers operating multiple displays or portrait screens who need structured window distribution and layout cycling.

Alternatives

  • AeroSpace is a window management application designed for macOS.
  • Amethyst is an alternative window management tool available for the macOS platform.

Sources

Related