Jump to content

Clearing Multiple Notifications


Recommended Posts

Hi,

I was looking for a workflow that can clear existing notifications from Notification Center panel. I found few but none of them seems to work with Alfred 4 / MacOS 12.3.1. If anyone can help that would be awesome.

 

Links that i found

https://github.com/skotzko/shhhhh

https://github.com/skotzko/shhhhh/issues/7#issuecomment-874773375

https://www.ryanmo.co/2016/04/18/clearing-multiple-notifications-in-mac-os-x/

 

Thanks

 

 

Link to comment

Those stopped working because they rely on GUI automation and Apple has since changed the Notification Centre. At the time I looked into it (and likely still the case) there wasn’t a good alternative to doing so.

 

Your best bet is to learn to live with those notifications, instead of trying to clear them. Note they won’t go on forever, they only go back seven days and anything older disappears, so there’s no need for manually clean them up.

Link to comment
  • 3 months later...
10 minutes ago, alfredpanda said:

I'd love to be able to clear with an Alfred shortcut.

 

The code is JXA, so you can do it in an Alfred Run Script with language set to /usr/bin/osascript (JavaScript). My previous reply still applies: those solutions use GUI automation, which is why they break when Apple makes changes.

Link to comment
  • 2 weeks later...
On 8/16/2022 at 5:03 PM, vitor said:

 

The code is JXA, so you can do it in an Alfred Run Script with language set to /usr/bin/osascript (JavaScript). My previous reply still applies: those solutions use GUI automation, which is why they break when Apple makes changes.

 

Tried https://github.com/zakyum/alfred-notification-dismisser and some scripts but there are not very reliable. Perhaps will live with notification as it is instead of clearing all. 

Link to comment
  • 4 weeks later...

How are you making this work? It's not working for me on 12.5.1.

 

I have notifications in Notification Center.

I run it in Alfred.

...nothing.

 

I wondered if Notification Center had to remain open, but it's impossible to do that.

 

image.thumb.png.e28441c16659f4056fa401680073504f.png

 

EDIT:

 

Got it—I was misunderstanding. This will indeed clear any persistent notifications on screen - thank you. It won't however clear what's in notification center.

Edited by alfredpanda
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...