转载自Change How Long Notification Banners Persist for in Mac OS X

消息弹窗(Banners)在屏幕的右上角显示,若干秒后自动消失。该弹窗的显示时间无法通过系统设置进行设置,但可以通过Terminal更改。

首先区分消息弹窗与警告(Banners vs Alerts)
Screen-Shot-2020-05-21-at-15.01.37
消息弹窗会自动消失;警告需要人为干预

修改弹窗显示时间(Terminal)

In macOS mojave/Catalina
defaults write com.apple.notificationcenterui bannerTime -int (time in seconds)

In macOS Sierra, El Capitan, Yosemite, and earlier:
defaults write com.apple.notificationcenterui bannerTime [time in seconds]

恢复系统默认设置:
defaults delete com.apple.notificationcenterui bannerTime