# Rectangle

免费开源的 Mac 窗口管理器，可通过自定义键盘快捷键和屏幕边缘贴靠区域移动、调整大小和平铺窗口。

> 这是 OpenNavo 上 Rectangle 页面的 Markdown 版本，内容与网页相同： <https://opennavo.com/zh/apps/rectangle>

- **最新版本**: `2.0.5`
- **开发者**: Ryan Hanson and contributors
- **主页**: <https://rectangleapp.com/>
- **分类**: [系统工具](https://opennavo.com/zh/categories/utilities)
- **安装**: `brew install --cask rectangle`
- **近 30 天安装**: 9,427
- **Homebrew**: 可以安装，应用会自行更新
- **下载地址**: <https://github.com/rxhanson/Rectangle/releases/download/v2.0.5/Rectangle2.0.5.dmg>
- **SHA-256**: `4dec773a2f550d64147d88e07d987ce8119bdff045f1c6993a9a5eeb9f68496c`

SHA-256 只用来核对下载的文件是否完整，不代表安全认证。

## 安装与卸载内容

```json
[
  {
    "declaration": {
      "uninstall": [
        {
          "login_item": "Rectangle",
          "quit": "com.knollsoft.Rectangle"
        }
      ]
    },
    "phase": "uninstall",
    "sources": [],
    "type": "uninstall"
  },
  {
    "declaration": {
      "app": [
        "Rectangle.app"
      ],
      "target": "/Applications/Rectangle.app"
    },
    "phase": "install",
    "sources": [
      "Rectangle.app"
    ],
    "target": "/Applications/Rectangle.app",
    "type": "app"
  },
  {
    "declaration": {
      "zap": [
        {
          "trash": [
            "~/Library/Application Scripts/com.knollsoft.RectangleLauncher",
            "~/Library/Application Support/Rectangle",
            "~/Library/Caches/com.knollsoft.Rectangle",
            "~/Library/Containers/com.knollsoft.RectangleLauncher",
            "~/Library/HTTPStorages/com.knollsoft.Rectangle",
            "~/Library/Preferences/com.knollsoft.Rectangle.plist",
            "~/Library/WebKit/com.knollsoft.Rectangle"
          ]
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## 介绍

Rectangle 是 Ryan Hanson 为 macOS 开发的免费开源窗口管理应用，基于 Spectacle。它帮助键盘用户以及同时使用多个窗口或显示器的用户整理桌面，无需反复手动调整窗口大小。

### 功能
- 将窗口移至支持的左右半屏、四分之一屏、三分之一屏等位置。
- 使用键盘快捷键或菜单操作最大化、居中、调整大小或还原窗口。
- 将窗口拖至可配置的屏幕边缘和角落以贴靠窗口。
- 在显示器之间移动窗口，并将普通窗口按行或列平铺。
- 在占据同一区域的堆叠窗口间切换。
- 自定义快捷键、忽略特定应用，以及导入或导出 JSON 设置。

### 安装与初次使用
安装 `brew install --cask rectangle`，或下载官方 DMG 并将 Rectangle.app 移至“应用程序”。启动应用，并在“系统设置”>“隐私与安全性”>“辅助功能”中授予其请求的辅助功能权限，以便它控制其他应用的窗口。选择快捷键设置，并在分配可能与其他应用冲突的按键前，先尝试菜单操作。将窗口拖到屏幕边缘，待预览显示所需位置后松开；如果只想通过键盘控制，也可以关闭贴靠功能。

### 要求、依赖与限制
Rectangle2.0.3要求 macOS14 或更新版本，并支持 Intel 和 Apple Silicon Mac。标记版本的官方 README 与当前 Homebrew cask 均注明需要 macOS14 或更新版本。项目注明 v1.100 适用于 macOS10.15–13，v0.73 适用于10.13–10.14；这些旧版本与当前 cask 分开。Homebrew 软件包未声明额外的 formula 依赖。辅助功能权限是运行所需条件，并非额外的 Homebrew formula。检索到的要求中未公布固定的内存或存储空间最低要求；安装空间与 DMG 下载大小不同。

Rectangle 无法突破应用的最小窗口尺寸限制。因此，较小的布局可能留下空隙或产生重叠；iTerm2 等终端程序则可能只能按整字符单元调整大小。操作通常作用于选中的显示器和当前 Space。此免费应用不支持在桌面/Spaces 之间移动窗口；不要将此功能与在显示器之间移动窗口混淆。跨显示器平铺需要启用相应的 Rectangle 设置，并关闭 macOS“显示器”中的“显示器使用单独的空间”。窗口动画仍属实验性功能，默认关闭；在限制窗口尺寸的应用中，动画表现可能不同。

### 冲突与故障排查
Homebrew 未声明与特定 cask 的冲突，但其他正在运行的窗口管理器或重叠的键盘快捷键可能造成干扰。尝试菜单操作、更改快捷键，或暂时退出其他窗口管理器，以确定原因。若希望优先使用应用自身的快捷键，请将其加入“忽略应用”。系统更改后，请确认辅助功能权限仍已启用；如有需要，项目 FAQ 介绍了如何重置权限并重新授予。手动安装的 Rectangle.app 可能占用相同的“应用程序”路径。可选的 Homebrew zap 清理会删除偏好设置和应用数据，因此请先导出要保留的设置。

### 平台、账户、费用与许可证
Rectangle 仅适用于 macOS；此应用没有官方 Windows、Linux、Android 或 iOS 版本。免费版本无需用户账户或付费订阅，并采用 MIT 许可证发布。可选捐赠用于支持开发。Rectangle Pro 是单独的付费产品，具有额外功能和独立条款，不包含在此 cask 中。您管理其窗口的商业软件仍遵循自身的许可证和账户要求。

### 官方参考资料
- [特定版本的 README 与要求](https://github.com/rxhanson/Rectangle/tree/v2.0.3)
- [官方发布版本](https://github.com/rxhanson/Rectangle/releases)
- [官方网站](https://rectangleapp.com/)
- [MIT 许可证](https://github.com/rxhanson/Rectangle/blob/v2.0.3/LICENSE)

## 系统要求

- macOS 14 起 · 应用版本: 2.0.5 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 核查于 2026-11-21
  - <https://github.com/rxhanson/Rectangle/releases/download/v2.0.5/Rectangle2.0.5.dmg>
  - SHA-256: `4dec773a2f550d64147d88e07d987ce8119bdff045f1c6993a9a5eeb9f68496c`
- macOS 14 起 · 应用版本: 2.0.5 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 核查于 2026-11-21
  - <https://github.com/rxhanson/Rectangle/releases/download/v2.0.5/Rectangle2.0.5.dmg>
  - SHA-256: `4dec773a2f550d64147d88e07d987ce8119bdff045f1c6993a9a5eeb9f68496c`

## Rectangle 的安全事实

这里只列可以核验的事实，并注明来源和日期，不是安全认证。要检查你下载的文件，可以用 OpenNavo 在本机扫描。

- <https://github.com/rxhanson/Rectangle> · 是否开源: 是 — <https://github.com/rxhanson/Rectangle> · 核查于 2026-11-13

## 卸载

- `brew uninstall --cask rectangle`

普通卸载会删除应用本身，设置和缓存会保留。

### 卸载时还会处理

- 登录项: `Rectangle` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

### 深度清理（可选）

- `brew uninstall --zap --cask rectangle`

`--zap` 还会删除 Homebrew 定义里列出的设置、缓存等文件，其中可能有其他应用共用的数据，删除后无法恢复；它也不保证没有任何残留。请先备份需要保留的数据；如要保留设置和缓存，请不要加 `--zap`。

普通卸载会删除应用本身，设置和缓存会保留。

- 文件和文件夹: `~/Library/Application Scripts/com.knollsoft.RectangleLauncher` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/Rectangle` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Caches/com.knollsoft.Rectangle` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Containers/com.knollsoft.RectangleLauncher` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/HTTPStorages/com.knollsoft.Rectangle` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Preferences/com.knollsoft.Rectangle.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/WebKit/com.knollsoft.Rectangle` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-21；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

## 最新版本说明

### 2.0.5 (2026-11-20)

#### What's Changed
* Free the Settings window when it closes by @zolferfigueiredo in https://github.com/rxhanson/Rectangle/pull/1930
* Add a Terminal option to use the full screen height when the menu bar is hidden by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1934
* Keep the stacked-window list highlight on the window at the front by @MyronKoch in https://github.com/rxhanson/Rectangle/pull/1938
* Localize the remaining Settings labels for zh-Hans by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1939
* Add a Snap Areas setting for restoring windows resized with Larger or Smaller by @SamuelAdigos in https://github.com/rxhanson/Rectangle/pull/1940
* Skip the title bar double-click action for ignored apps by @SamuelAdigos in https://github.com/rxhanson/Rectangle/pull/1941
* Complete the Spanish (es, es-419) localization by @SamuelAdigos in https://github.com/rxhanson/Rectangle/pull/1942
* Ignore keyboard shortcuts while Mission Control is active by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1935
* Add Hindi (hi) localization by @samanyudas in https://github.com/rxhanson/Rectangle/pull/1944
* Complete the Traditional Chinese (zh-Hant) localization by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1946
* Move thirds and fourths to the adjacent display on repeat by @tlq5l in https://github.com/rxhanson/Rectangle/pull/1937
* Add a Terminal option to apply an action to every new window by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1945
* Reflow Todo mode when the display configuration changes by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1947
* Fix RectangleTests failing to compile on main by @yannickgloster in https://github.com/rxhanson/Rectangle/pull/1954
* Keep drag-to-snap on the other displays while a window is fullscreen by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1949
* Keep the Todo window on screen when its app enforces a wider minimum width by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1950
* Support vertical display traversal on repeated half actions by @yannickgloster in https://github.com/rxhanson/Rectangle/pull/1952
* Add a download and update section for mainland China users to README.zh-Hans.md by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1963
* The `WindowManager` needs to be adjusted so that it can accommodate future changes by @rxhanson in https://github.com/rxhanson/Rectangle/pull/1967
* Move window to the display under the cursor  by @Kiizon in https://github.com/rxhanson/Rectangle/pull/1913
* Make the default display ordering deterministic by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1960
* Floor the center third calculations to whole pixels by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1961
* Keep zh-Hans up to date: README sync and translation fixes by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1964
* Give the Todo side its own strings by @AkiyamaKunka in https://github.com/rxhanson/Rectangle/pull/1966
* Don't show window size warning on terminal windows unnecessarily by @rxhanson in https://github.com/rxhanson/Rectangle/pull/1971
* Complete the Italian, Brazilian Portuguese and Spanish translations by @zolferfigueiredo in https://github.com/rxhanson/Rectangle/pull/1957
* Localize tests that fail when not run in English by @rxhanson in https://github.com/rxhanson/Rectangle/pull/1972
* Add display-aware corner size cycling by @joseph-zhong in https://github.com/rxhanson/Rectangle/pull/1962
* Complete the Japanese (ja) localization by @poife in https://github.com/rxhanson/Rectangle/pull/1970
* Cycle vertical sixths through whole sixth, top half and bottom half on repeat by @ehippy in https://github.com/rxhanson/Rectangle/pull/1968
* Split Rectangle tests into focused files by @rxhanson in https://github.com/rxhanson/Rectangle/pull/1975

#### New Contributors
* @zolferfigueiredo made their first contribution in https://github.com/rxhanson/Rectangle/pull/1930
* @SamuelAdigos made their first contribution in https://github.com/rxhanson/Rectangle/pull/1940
* @samanyudas made their first contribution in https://github.com/rxhanson/Rectangle/pull/1944
* @tlq5l made their first contribution in https://github.com/rxhanson/Rectangle/pull/1937
* @yannickgloster made their first contribution in https://github.com/rxhanson/Rectangle/pull/1954
* @Kiizon made their first contribution in https://github.com/rxhanson/Rectangle/pull/1913
* @joseph-zhong made their first contribution in https://github.com/rxhanson/Rectangle/pull/1962
* @poife made their first contribution in https://github.com/rxhanson/Rectangle/pull/1970

**Full Changelog**: https://github.com/rxhanson/Rectangle/compare/v2.0.4...v2.0.5

## 资料与来源

- <https://opennavo.com/zh/apps/rectangle>
- <https://opennavo.com/zh/apps/rectangle/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/r/rectangle.rb> · 核查于 2026-11-21
- <https://formulae.brew.sh/cask/rectangle>
- <https://github.com/rxhanson/Rectangle> · 核查于 2026-11-13
