explaingit

rxhanson/rectangle

29,066SwiftAudience · developerComplexity · 2/5ActiveLicenseSetup · easy

TLDR

A macOS app that snaps windows to halves, quarters, thirds, or custom layouts with keyboard shortcuts or edge-dragging, like Windows' snap feature.

Mindmap

mindmap
  root((Rectangle))
    What it does
      Snap windows to halves
      Snap to quarters
      Snap to thirds
      Maximize or center
    How to use it
      Keyboard shortcuts
      Drag to screen edge
      Visual preview
      Multi-monitor support
    Use cases
      Side-by-side coding
      Document comparison
      Multi-window workflows
      Organized workspace
    Tech details
      Swift language
      macOS 10.15 plus
      Open source

Things people build with this

USE CASE 1

Arrange two code windows side-by-side for comparing or refactoring code.

USE CASE 2

Snap a browser and document editor into halves for research and writing.

USE CASE 3

Organize four app windows into corners for monitoring dashboards or chat.

USE CASE 4

Quickly maximize or center a window without touching the mouse.

Tech stack

SwiftmacOS

Getting it running

Difficulty · easy Time to first run · 5min
Open-source successor to Spectacle; permissive license allowing free use and modification.

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
How do I set up Rectangle to snap my active window to the left half of my screen with a keyboard shortcut?
Prompt 2
Show me how to configure Rectangle to ignore keyboard shortcuts in a specific app like Vim or Emacs.
Prompt 3
How can I use Rectangle to move a window to my second monitor and snap it to a quarter layout?
Prompt 4
What are all the preset window layouts Rectangle supports, and how do I trigger each one?
Prompt 5
How do I customize Rectangle's keyboard shortcuts and create my own window snap positions?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.