隐藏 macOS 程序坞的“最近使用的应用”区域

关闭 show-recents,让程序坞不再保留一排最近打开的应用图标。

macOS程序坞macOSdefaults 偏好设置中风险
运行 defaults write com.apple.dock show-recents -bool false && killall Dock。

01命令

命令
$ defaults write com.apple.dock show-recents -bool false && killall Dock

02作用说明

从 Big Sur 开始,程序坞会固定保留最近使用的三个应用的位置,不少用户觉得多余——反正有启动台和聚焦搜索。show-recents 这个键对应系统设置 > 桌面与程序坞里的复选框,写为 false 后该区域消失,其余图标会重新居中排列。killall Dock 让修改立即生效,改回 true 即可恢复。

03风险

风险中风险

04撤销

撤销
$ defaults write com.apple.dock show-recents -bool true && killall Dock

05来源

  • macOS defaults - read, write and delete macOS user defaults
    SS64 · technical · 2026-09-17
    依据: Documents `defaults write domain key -bool value` for boolean preference keys in the com.apple.dock domain, and killing the Dock (killall Dock) so preference changes take effect.
  • macOS setup dotfiles (.macos)
    mathiasbynens/dotfiles (GitHub) · community · 2026-09-17
    依据: Contains 'defaults write com.apple.dock show-recents -bool false' with a comment about hiding the recent apps section of the Dock.

最后验证: 2026-09-19 · 分类: 系统与设置

06相关方案