Rectangle — Move and resize windows on macOS with keyboard shortcuts and snap areas
Rectangle: A Modern Window Management Tool for macOS
Rectangle is a window management app for macOS, inspired by Spectacle and built in Swift. It brings a lightweight, keyboard-friendly way to position and resize windows by snapping them to edges, halves, quarters, and thirds of the screen. The project embraces a simple, focused design while offering a robust feature set that makes multitasking on macOS more efficient. The visuals and behavior are crafted to feel native, with an emphasis on speed, reliability, and extensibility through keyboard shortcuts and URL-based actions.
[Image: Build status badge for Rectangle on GitHub] https://github.com/user-attachments/assets/e8d88e5f-7d4f-43bc-a82e-146c42f92d68
A quick look at Rectangle’s core
- A Swift-based window manager that works with macOS to arrange windows without dragging them manually across the desktop.
- It extends the classic window snapping concept with a precise grid-like approach to edges, corners, and various horizontal and vertical divisions.
- The app leverages modern macOS features and integrates with keyboard shortcuts to provide a frictionless, hands-on workflow.
System requirements and compatibility
What you need to run Rectangle
- macOS version: Rectangle supports macOS 10.15 (Catalina) and later.
- The last version that supported macOS 10.13 and 10.14 is available on the releases page (v0.73).
Why the requirements matter
- macOS 10.15+ unlocks the modern window management APIs Rectangle relies on, ensuring smooth animations and reliable snapping.
- If you’re on an older macOS release, you can still use Rectangle v0.73, but newer features and refinements are reserved for newer systems.
Installation options: getting Rectangle onto your Mac
Two straightforward ways to install Rectangle
- Downloading the latest DMG: Visit rectangleapp.com to grab the current release, or check the Releases page on GitHub for the most recent version.
- Homebrew Cask: Open a terminal and run the following command to install Rectangle via Homebrew: brew install --cask rectangle
Tips for a smooth start
- If you plan to synchronize configurations across machines, rely on the built-in import/export for JSON config files.
- The app stores preferences and keyboard shortcuts, so you can back up and restore settings when moving to a new Mac.
How to use Rectangle: snapping, resizing, and actions
Snap areas and resulting actions
- Drag a window to the edge of the screen until a footprint appears, indicating how the window will be resized when you release.
- Snap area behavior (quick guide):
- Left or right edge: move the window to the left or right half of the screen.
- Top edge: maximize the window.
- Corners: snap into the corresponding quarter in that corner.
- Left or right edge, just above or below a corner: snap to the top or bottom half.
- Bottom left, center, or right third: snap to the respective third.
- Bottom left or right third, then drag to bottom center: result is the first or last two thirds, respectively.
Working with ignore and focused windows
- Ignore an app: this feature prevents Rectangle from stealing or intercepting keyboard shortcuts while that app is frontmost.
- How to ignore: focus the target app, open Rectangle’s menu, select “Ignore app.”
- How to un-ignore: bring the app frontmost again, open the Rectangle menu, and deselect “Ignore.”
- Why ignore matters: it’s useful for apps that reuse common shortcuts you don’t want to clash with Rectangle’s bindings.
Triggering actions via URL: automations and integrations
Rectangle supports URL-based actions for quick automation
- Basic usage: open a URL like rectangle://execute-action?name=[name].
- What you can trigger: a wide range of layouts and actions, including left-half, right-half, center-half, top-half, bottom-half, all the named regions, maximize, restore, moves between displays, and more.
- Example names include: left-half, right-half, center-half, top-half, bottom-half, top-left, top-right, bottom-left, bottom-right, first-third, center-third, last-third, first-two-thirds, last-two-thirds, maximize, almost-maximize, center, center-prominently, restore, next-display, previous-display, move-left, move-right, move-up, move-down, and many sixths, ninths, and quarter configurations.
- Running from the shell: you can trigger a specific action with a single command: open -g "rectangle://execute-action?name=left-half"
- You can also ignore or unignore apps via URL, optionally specifying a target app by bundle ID (for example com.apple.Safari).
Advanced URL options and app targeting
- You can specify a bundle identifier to apply an action to a particular application, enabling per-application window management workflows.
- The URL system is designed to be scriptable and friendly to automation rigs that manage window layouts as part of a larger workflow.
Terminal commands for hidden preferences and debugging
A path to deeper customization and troubleshooting
- Rectangle’s hidden preferences and debugging features can be explored through dedicated commands and documentation. See the included TerminalCommands.md for specifics on enabling debugging and reading logs.
- Debug logging: you can enable verbose logs to diagnose issues by using in-app menu options (View Logging) and observing live output as you issue commands.
- Logging helps verify whether rectangles are calculated correctly or if another application is interfering with window movements.
Importing, exporting, and backing up configurations
Config management in Rectangle
- Import/export: Rectangle offers JSON-based config import/export within the Preferences pane.
- On launch, Rectangle loads a config file from ~/Library/Application Support/Rectangle/RectangleConfig.json if present and renames the old file with a time/date stamp to avoid re-reading it on subsequent launches.
- Preferences storage: Your settings and shortcuts are stored in ~/Library/Preferences/com.knollsoft.Rectangle.plist. Shortcuts saved in v0.41+ may use a different format than earlier versions, so compatibility considerations apply when transferring between machines.
- Sharing configurations: The import/export feature makes it easy to share keyboard shortcuts and window layouts across machines or teams.
Troubleshooting and known issues: what to check first
Common issues and quick fixes
- If Rectangle doesn’t resize or move windows as expected, other applications might be conflicting with Rectangle or keyboard shortcuts in macOS.
- A frequent workaround for certain glitches includes restarting Rectangle, ensuring accessibility permissions are granted, and updating macOS to the latest version.
- One known issue involves Notification Center performance: some users report freezing behavior. If this occurs, disable “Snap windows by dragging” in Rectangle’s preferences.
A structured troubleshooting workflow
- Quick fixes to try first:
- Lock and unlock your Mac to reset transient states.
- Ensure macOS is up to date.
- Restart the Mac after updates.
- Diagnosing the issue:
- Enable debug logging to see how Rectangle computes target frames.
- Compare your calculated rect with the actual rect to identify interference from another app.
- Checking for conflicts:
- Verify that there are no other window managers running.
- Confirm that the active app doesn’t have conflicting keyboard shortcuts.
- Use the menu commands to test window actions or try changing shortcuts to see whether the issue is a keyboard binding problem.
- Advanced steps:
- Create a new macOS user account to see if the issue is user-specific.
- Save and attach logs to issue reports if you need to file a bug.
Resetting accessibility permissions for Rectangle
- If you suspect permission issues, you can reset accessibility permissions: tccutil reset All com.knollsoft.Rectangle
- Alternatively, disable Rectangle in System Settings -> Privacy & Security -> Accessibility, remove it, restart, and re-enable when you launch Rectangle again.
View logging for real-time feedback
- You can view logs live by accessing the View Logging option from Rectangle’s menu (hold Alt while opening the menu to reveal the option).
Managing JSON config: import/export
Storing and sharing configurations
- RectangleConfig.json is the primary file for user-specific layouts and shortcuts.
- The app gracefully migrates or renames existing config files to prevent accidental reloading of old settings.
- When transferring to another machine, simply export the JSON file from the source machine and import it on the destination.
Versioning and storage notes
Where settings live on disk
- Preferences are stored at ~/Library/Preferences/com.knollsoft.Rectangle.plist.
- Shortcuts and their structures may differ between v0.41+ and earlier versions, so when moving between major versions, consider exporting/importing or reconfiguring shortcuts.
- If you install Rectangle via Homebrew and run into persistence issues after restart, consider reinstalling with the --zap option to remove plist entries.
Uninstallation: removing Rectangle cleanly
How to uninstall Rectangle
- Quit the app and move it to the Trash.
- Remove the defaults with: defaults delete com.knollsoft.Rectangle
- If you installed via Homebrew, use the --zap flag to also clear configuration files: brew uninstall --zap rectangle
Contributing to Rectangle: community and collaboration
How you can contribute
- Rectangle’s codebase is built with a foundation that supports broader ecosystems and projects.
- Logic from Rectangle is used in the Multitouch app, and Rectangle Pro builds on top of Rectangle. If you contribute significant code or localization work that gets merged, you may be eligible for a free Multitouch or Rectangle Pro license.
- Contributors to related projects (Sparkle, MASShortcut, Spectacle) can also receive licenses as a token of gratitude.
Localization and expanding reach
- All translations are centralized in Main.strings. If you’d like to contribute to localization, pull requests for new translations or improvements are welcome.
Running Rectangle in Xcode (for developers)
Developer notes for building and contributing
- Rectangle uses Swift Package Manager to install dependencies such as Sparkle and MASShortcut.
- The MASShortcut project is a fork maintained by the Rectangle author due to the original MASShortcut repository being archived. If you’re implementing changes affecting MASShortcut behavior, submit pull requests to the fork.
- There can be build issues on macOS versions earlier than a certain threshold (macOS 26 in the notes). If you encounter those, you can remove the “Asset Catalog Other Flags” to build locally for older macOS versions, but avoid committing that change.
Credits and acknowledgments
The ecosystem and appreciation
- Rectangle relies on a fork of MASShortcut, which continues to work well within Rectangle’s architecture.
- Sparkle powers the update mechanism, providing a smooth upgrade path for users.
- Iconography: the Big Sur variant of the app icon was created by Giovanni Maria Cusaro (gmcusaro), and the Liquid Glass icon variant was created by Alexander Käßner (alexkaessner).
- The project thrives on community contributions, feedback, and shared solutions that keep window management fast and intuitive on macOS.
Images and visual sense
Visuals accompanying the write-up
- The build status badge at the top of the official repository page symbolizes ongoing maintenance and continuous integration for Rectangle’s releases.
- The input includes an illustrative image that complements the description. Use the embedded image reference to enrich the narrative:
- Image: https://github.com/user-attachments/assets/e8d88e5f-7d4f-43bc-a82e-146c42f92d68
A closing note: why Rectangle matters in your macOS workflow
Rectangle brings clarity and speed to daily window management
- It reduces the friction of resizing and repositioning windows by turning screen real estate into a snap-friendly playground.
- The combination of edge, corner, and fractional snap options enables precise layouts that scale with your screen’s aspect and orientation.
- The URL-driven automation and the option to ignore apps give you the flexibility to tailor Rectangle to your exact workflow and avoid conflicts with other tools.
Developer-friendly, user-focused design
What makes Rectangle stand out
- A lean, Swift-based implementation prioritizes performance and low overhead, keeping the system responsive while you multitask.
- The integration with a broad ecosystem of tools—Sparkle for updates, MASShortcut for shortcuts, and a robust notification of actions—ensures a cohesive experience.
- The project’s openness to localization, extra shortcuts, and cross-machine configurations makes Rectangle a practical choice for diverse teams and power users alike.
If you’re exploring better window management on macOS, Rectangle offers a pragmatic, well-documented approach that blends familiar concepts with modern conveniences. Whether you’re a developer who wants to script layouts with URL actions, a designer who relies on precise window grids, or simply someone who wants to reclaim screen real estate with minimal clicks, Rectangle provides a dependable toolkit. With its active community, ongoing refinements, and thoughtful feature set, Rectangle stands as a strong contender in the macOS window management landscape.
Enjoying this project?
Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.
Repository:https://github.com/rxhanson/Rectangle
GitHub - rxhanson/Rectangle: Rectangle — Move and resize windows on macOS with keyboard shortcuts and snap areas
Move and resize windows on macOS with keyboard shortcuts and snap areas...
github - rxhanson/rectangle

