explaingit

rxhanson/rectangle

Analysis updated 2026-06-20

29,001SwiftAudience · generalComplexity · 1/5Setup · easy

TLDR

A macOS app that lets you snap, resize, and move windows into preset layouts using keyboard shortcuts or drag-to-edge gestures, bringing Windows-style window snapping to Mac.

Mindmap

mindmap
  root((rectangle))
    What it does
      macOS window snapping
      Keyboard shortcut layouts
      Drag to edge snapping
    Layout Options
      Halves and quarters
      Thirds
      Maximized
    Use Cases
      Side-by-side windows
      Multi-monitor workflow
      Tidy workspace
    Audience
      Mac power users
      Developers
      Writers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Snap two app windows side by side to compare documents without manually dragging and resizing each one.

USE CASE 2

Use keyboard shortcuts to instantly tile your code editor and terminal into exact halves of your Mac screen.

USE CASE 3

Move an app window to a second monitor with a single key combination instead of dragging it across screens.

USE CASE 4

Organize multiple open windows into quarter-screen or third-screen zones on a wide monitor for a tidy workspace.

What is it built with?

SwiftmacOS

How does it compare?

rxhanson/rectanglekodecocodes/swift-algorithm-clubchartsorg/charts
Stars29,00129,10428,002
LanguageSwiftSwiftSwift
Setup difficultyeasyeasymoderate
Complexity1/51/52/5
Audiencegeneraldeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
License not specified in the explanation.

In plain English

Rectangle is a window management app for macOS that lets you move and resize windows quickly using keyboard shortcuts or by dragging them to screen edges. If you've ever wished you could snap a window to fill exactly the left half of your screen, the way Windows does when you drag a window to the edge, Rectangle brings that same kind of control to Mac. The core idea is simple: instead of manually dragging and resizing application windows, you press a key combination and Rectangle instantly repositions the active window to a preset layout. Common layouts include halves (left, right, top, bottom), quarters (each corner), thirds, and maximized. You can also drag a window to a screen edge or corner to trigger the same snaps visually, seeing a preview footprint before you release the mouse. Beyond basic snapping, Rectangle supports moving windows to different monitors, centering windows, almost-maximizing (leaving a small gap around the window), and adjusting window size incrementally. If a particular app already uses a keyboard shortcut that conflicts with Rectangle, you can tell Rectangle to ignore that app entirely. Rectangle is built in Swift and works on macOS 10.15 and later. It is the open-source successor to the older Spectacle app, with additional actions and improvements over its predecessor. Someone who works with many open windows simultaneously, developers, writers, or anyone doing side-by-side comparisons, would find it a practical tool for staying organized without reaching for the mouse.

Copy-paste prompts

Prompt 1
I just installed Rectangle on macOS, what are the most useful keyboard shortcuts to learn first for common window arrangements like halves and quarters?
Prompt 2
How do I configure Rectangle to skip a specific app so it never moves or resizes that app's windows?
Prompt 3
Show me how to set up Rectangle so pressing a shortcut moves the active window to my second monitor and fills the right half of that screen.
Prompt 4
What is the difference between Rectangle's maximize and almost-maximize actions, and which should I use for a full-screen coding setup?

Frequently asked questions

What is rectangle?

A macOS app that lets you snap, resize, and move windows into preset layouts using keyboard shortcuts or drag-to-edge gestures, bringing Windows-style window snapping to Mac.

What language is rectangle written in?

Mainly Swift. The stack also includes Swift, macOS.

What license does rectangle use?

License not specified in the explanation.

How hard is rectangle to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is rectangle for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.