CLI tool
rxhanson/Rectangle avatar
rxhanson/Rectangle

Rectangle: keyboard window tiling for macOS, and where its grid stops

Move and resize windows on macOS with keyboard shortcuts and snap areas

29,912 stars994 forksSwiftNOASSERTION

At a glance

What is it?
Rectangle is a Swift menu bar app that moves and resizes macOS windows through keyboard shortcuts, URL actions and drag-to-edge snap areas. It is a good fit for people who want fixed layouts without a subscription, and a poor fit for anyone who needs to move windows between Spaces or resize an app that enforces a large minimum width.
Who is it for?
Adopt Rectangle if you are on macOS 10.15 or later and want deterministic layouts driven by keys, drags or a rectangle:// URL from a script. Do not adopt it if you need windows placed on other Spaces, or if your main apps enforce minimum window sizes larger than the layout you want.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Swift, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The problem Rectangle solves, and the people it is built for

macOS gives you a green zoom button and a drag-to-edge behaviour that only recently learned to split a screen in two. If you want a window at exactly one third of a display, or at the top-left ninth, you either drag edges by hand or you buy something. Rectangle fills that gap with a menu bar app that maps named layouts to keyboard shortcuts and to snap areas at the screen edges.

The README describes it as "a window management app for macOS based on Spectacle", which is the honest framing. The target user is someone who keeps a fixed mental map of where windows belong and wants that map reproduced by a keystroke, without opening a tiling window manager that reflows every window automatically. The URL interface extends that audience to people who script: a shell one-liner can trigger the same layout a shortcut would. It is not aimed at users who want automatic tiling as they open and close windows. Every action here is explicit.

What the action vocabulary actually covers

The list of values accepted by the URL interface is the clearest statement of what Rectangle can do. Halves come in five flavours: left, right, center, top and bottom. Quarters are the four corners. Thirds are first, center and last, with first-two-thirds and last-two-thirds as separate actions. Fourths run first through last. Sixths cover the top and bottom rows. Ninths cover a full three-by-three grid. Eighths cover the top and bottom rows in a four-column arrangement, with the two center columns split into left and right variants.

That is a lot of named rectangles, and the naming is mostly self-describing. The README notes one design decision worth flagging: screen orientation is taken into account, so "first third will be left third on landscape and top third on portrait". That is a real difference from treating the screen as a fixed coordinate space, and it means a shortcut bound to first-third behaves differently on a rotated display.

Beyond geometry, there are resize actions (smaller, larger), positioning actions (center, center-prominently, almost-maximize, maximize-height), display actions (next-display, previous-display), nudges (move-left, move-right, move-up, move-down), and two bulk actions: tile-all and cascade-all, plus cascade-active-app. restore undoes the last layout. reverse-all is listed without further explanation in the README, so its exact behaviour is not something I can confirm from the supplied material.

Snap areas and the drag-to-edge mechanics

Snap areas are the mouse-driven half of the app. You drag a window toward a screen edge; when the cursor reaches the edge, a footprint appears showing where Rectangle will place the window if you release the click. The README's table is precise about the mapping. Left or right edge gives the corresponding half. Top gives maximize. Corners give the quarter in that corner. An edge position just above or below a corner gives the top or bottom half. The bottom left, center and right thirds give the respective third, and dragging from a bottom corner third to bottom center gives the first or last two thirds.

That last rule is the one that needs practice. It is a gesture that begins in one snap zone and completes in another, and it is the only place in the table where the release point matters more than the entry point. If you never used snap areas on Windows, the README acknowledges this directly: shortcuts are "self explanatory", snap areas "can use some explanation".

Snapping can be turned off. The README mentions this twice: once as a feature toggle, and once as the fix for a freeze that some users see in Notification Center. That second mention is the more interesting one, because it means the drag-monitoring path is the suspected cause of a system-level symptom for a subset of users.

Getting it installed and driving it from a shell

Installation is a Homebrew cask or a dmg download. The README gives the cask command:

brew install --cask rectangle

The dmg is available from rectangleapp.com or the Releases page. System requirement is macOS 10.15 or later. The README states that the last version supporting macOS 10.13 and 10.14 is v0.73, which matters if you maintain older machines: you cannot simply take the newest release there.

The scripting interface is a URL scheme. The README's example is:

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

The -g flag keeps the terminal in the foreground, and the README adds "Do not activate Rectangle if possible", which is a hint about how you should call it from automation. Tasks use a parallel scheme:

rectangle://execute-task?name=ignore-app rectangle://execute-task?name=unignore-app

A bundle identifier can be attached, for example rectangle://execute-task?name=ignore-app&app-bundle-id=com.apple.Safari. There is also a TerminalCommands.md file referenced for hidden preferences, though its contents are not included in the material I have.

The ignore feature has a mechanism worth understanding before you use it. Ignoring an app means that while that app is frontmost, Rectangle's keyboard shortcuts are un-registered from macOS, and they are re-registered when it stops being frontmost. This is aimed at apps whose own shortcuts collide with Rectangle's, and it is a cleaner answer than rebinding your layout keys.

Where the grid breaks: minimum sizes, Spaces, and iTerm2

The README documents a limitation that no amount of configuration fixes. Some apps enforce a minimum window size larger than the requested layout. The example given is a window with a minimum width of 600 points that cannot fit a 504-point third of a display. Rectangle keeps the window on screen and briefly shows a "Window size limited" message. The README is explicit that Rectangle cannot override an app's minimum window size. If your daily work happens in windows that refuse to shrink, thirds and smaller layouts are simply unavailable to you, and the practical workaround named in the README is to use halves or resize the neighbouring window by hand.

Spaces are a hard boundary. The README states plainly that Rectangle cannot move windows to other desktops or Spaces because Apple never released a public API for it, and that while Rectangle Pro has next/prev Space actions, there are no plans to add them to Rectangle. If moving a window to another desktop is part of your workflow, this project is the wrong tool and the README says so.

iTerm2 has a specific quirk: by default it resizes only in increments of character widths, so layouts come out slightly off. The README gives a command to change that:

defaults write com.googlecode.iterm2 DisableWindowSizeSnap -integer 1

Note that this writes into iTerm2's preferences, not Rectangle's. The Notification Center freeze is a third failure mode, described as affecting "only a small amount of users", with the suggested mitigation being to uncheck "Snap windows by dragging". The README points at issue 317 for that. Since the freeze is intermittent and user-specific, treat it as something to reproduce on your own machine rather than a condition you can predict.

Rectangle versus Spectacle, and the choice of shortcut recorder

Rectangle is a fork in spirit of Spectacle, and the README lists the differences rather than leaving you to diff them. The first is the shortcut recorder: Rectangle uses MASShortcut, a separate library, where Spectacle shipped its own. That is a maintenance decision as much as a user-facing one, since shortcut recording is fiddly and offloading it means Rectangle inherits fixes made upstream.

The action set is broader. Rectangle adds edge moves that reposition without resizing, maximize-height, and almost-maximize. The thirds model is the more consequential change. Spectacle had next/prev screen thirds as a cycling pair; Rectangle replaces that with explicit first third, first two thirds, center third, last two thirds and last third. The README notes you can still emulate the old cycling by repeatedly executing first third or last third, so the behaviour is recoverable, but the default is now stateless: each action names its destination.

There is also an option to have windows traverse across displays on subsequent left or right executions, which Spectacle did not have, and the snap-area behaviour itself. If you are migrating from Spectacle, the migration cost is mostly in your shortcut bindings and in unlearning the cycling habit. If you are choosing between the two fresh, Spectacle is not the live option here; Rectangle is the maintained one, with releases through 2026.

Maintenance, licensing and what to check before you commit

The repository is active, not archived, with a most recent push in September 2026 and releases in the months before it. The version numbering is worth a second look: v0.98 in July 2026, v0.99 in August, then v1.100 later in August. The jump from 0.99 to 1.100 is a numbering choice, not evidence of a rewrite, and the README's macOS 10.15 floor is the constraint that actually governs upgrades.

The licence field in the repository metadata is NOASSERTION, which means the licence could not be automatically classified. That is not the same as having no licence, and it is not something I can resolve from the material here. If you plan to redistribute Rectangle, bundle it, or build on its source, read the LICENSE file in the repository yourself and get your own advice; the metadata alone tells you nothing usable about your obligations.

Upgrade cost is low for the app itself, since the cask command handles it, but the hidden preferences in TerminalCommands.md are the part that tends to be forgotten. Settings written through defaults commands live outside the app's preferences UI, so an upgrade is a good moment to re-read that file and confirm what you set is still what you want. The two settings named in the README, the iTerm2 snap disable and the snap-by-dragging toggle, are the ones most likely to be in play on a working machine.

Editorial conclusion

Adopt Rectangle if you are on macOS 10.15 or later and want deterministic layouts driven by keys, drags or a rectangle:// URL from a script. Do not adopt it if you need windows placed on other Spaces, or if your main apps enforce minimum window sizes larger than the layout you want. Before rolling it out, check two things on your own machine: whether the apps you tile most often respect thirds, and whether the snap-by-dragging feature causes Notification Center to freeze for you, since the README ties that symptom to that specific setting.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. rxhanson/Rectangle on GitHub
Community notes

Community notes