jackk Posted April 20, 2022 Share Posted April 20, 2022 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
vitor Posted April 20, 2022 Share Posted April 20, 2022 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
jackk Posted April 20, 2022 Author Share Posted April 20, 2022 Dang that's unfortunate. Link to comment
Mattias Posted April 27, 2022 Share Posted April 27, 2022 This would be a great function. Link to comment
alfredpanda Posted August 16, 2022 Share Posted August 16, 2022 (edited) @vitor have you seen these? https://github.com/Ptujec/LaunchBar/tree/master/Notifications#readme https://gist.github.com/lancethomps/a5ac103f334b171f70ce2ff983220b4f I'd love to be able to clear with an Alfred shortcut. Edited August 16, 2022 by alfredpanda Link to comment
vitor Posted August 16, 2022 Share Posted August 16, 2022 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
TomBenz Posted August 28, 2022 Share Posted August 28, 2022 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
Stephen_C Posted August 28, 2022 Share Posted August 28, 2022 See also my reply to your other post here. Stephen Link to comment
bartoszpet Posted September 19, 2022 Share Posted September 19, 2022 This one works perfectly (tested with macOS Monterey 12.6): https://github.com/bpetrynski/alfred-notification-dismisser Link to comment
alfredpanda Posted September 26, 2022 Share Posted September 26, 2022 (edited) 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. 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 September 26, 2022 by alfredpanda Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now