How To Change The Duration Of Notifications On Macos

By admin ·

I enjoy Apple’s notification center, but sometimes I get way too many notifications. This can be distracting, not to mention it takes up screen real estate for quite a while. To my knowledge, there is no way to change the duration of notifications in System Preferences, but it can be done using the defaults command.

1

Open Terminal

You can open Terminal by using Finder and going to Applications > Utilities > Terminal. Or you can hit cmd + space bar and search for Terminal.

2

Using the defaults command, set your desired duration

Type the following into Terminal:

defaults write com.apple.notificationcenterui bannerTime -int {duration}

Substitute {duration} for your desired duration. Since I wanted to shorten the duration of the notifications dramatically I used:

defaults write com.apple.notificationcenterui bannerTime -int 1
3

Log out and log back in

In order for this change to take effect you must log out and back in. Click on the “Apple” in the top left of the screen and click “Log out …”. Or you can type cmd + shift + Q.

4

Test it out

If you’d like to test out the notification duration, you can run the following command in Terminal to display notifications from the command line:

osascript -e 'display notification "test notification!"'
1

Open Terminal

You can open Terminal by using Finder and going to Applications > Utilities > Terminal. Or you can hit cmd + space bar and search for Terminal.

2

Using the defaults command, set your desired duration

Type the following into Terminal:

defaults write com.apple.notificationcenterui bannerTime -int {duration}

Substitute {duration} for your desired duration. Since I wanted to shorten the duration of the notifications dramatically I used:

defaults write com.apple.notificationcenterui bannerTime -int 1
3

Log out and log back in

In order for this change to take effect you must log out and back in. Click on the “Apple” in the top left of the screen and click “Log out …”. Or you can type cmd + shift + Q.

4

Test it out

If you’d like to test out the notification duration, you can run the following command in Terminal to display notifications from the command line:

osascript -e 'display notification "test notification!"'
1

Open Terminal

You can open Terminal by using Finder and going to Applications > Utilities > Terminal. Or you can hit cmd + space bar and search for Terminal.

2

Using the defaults command, set your desired duration

Type the following into Terminal:

defaults write com.apple.notificationcenterui bannerTime -int {duration}

Substitute {duration} for your desired duration. Since I wanted to shorten the duration of the notifications dramatically I used:

defaults write com.apple.notificationcenterui bannerTime -int 1
3

Log out and log back in

In order for this change to take effect you must log out and back in. Click on the “Apple” in the top left of the screen and click “Log out …”. Or you can type cmd + shift + Q.

4

Test it out

If you’d like to test out the notification duration, you can run the following command in Terminal to display notifications from the command line:

osascript -e 'display notification "test notification!"'
1

Open Terminal

You can open Terminal by using Finder and going to Applications > Utilities > Terminal. Or you can hit cmd + space bar and search for Terminal.

2

Using the defaults command, set your desired duration

Type the following into Terminal:

defaults write com.apple.notificationcenterui bannerTime -int {duration}

Substitute {duration} for your desired duration. Since I wanted to shorten the duration of the notifications dramatically I used:

defaults write com.apple.notificationcenterui bannerTime -int 1
3

Log out and log back in

In order for this change to take effect you must log out and back in. Click on the “Apple” in the top left of the screen and click “Log out …”. Or you can type cmd + shift + Q.

4

Test it out

If you’d like to test out the notification duration, you can run the following command in Terminal to display notifications from the command line:

osascript -e 'display notification "test notification!"'