How to change how long notifications stay on a Mac?

Solution 1:

I was able to get this to work as of Catalina (10.15.2)

First, you need to specify -int before the number of seconds parameter:

defaults write com.apple.notificationcenterui bannerTime -int 2

You then need to restart the NotificationCenter process by signing out/rebooting or running:

killall NotificationCenter

Solution 2:

On newer os, you can’t change this.

  • https://apple.stackexchange.com/a/269022/5472

On older os, you can customize the timing:

defaults write com.apple.notificationcenterui bannerTime 2

Works for me on El Capitan.