Clear notifications with a keyboard shortcut!!!

Close notification with keyboard shortcut! (no need to open notifications center)

  1. Find the position of the little "x" button on the notification, for me that's 1324,20 on a MacBook Air.
  2. Install cliclick (brew install cliclick)
  3. Use this as a shell script:
POS=$(/opt/homebrew/bin/cliclick p)
/opt/homebrew/bin/cliclick c:1324,20
/opt/homebrew/bin/cliclick m:$POS

Or you can use the "Close All Notification Alerts" predefined action that is included in BTT :wink:


I spent 2 hours figuring out how to do this ='( Thanks though lol

:grinning: also note you can use BTT's "move mouse to position" and leftclick actions to click anywhere on your screen. So you would not need click click eben when doing it like this

Thanks @Andreas_Hegenberg one of the more annoying things about MacOS, is the notification alerts about disconnecting external drives. You've helped me to fix this nicely, but open to any further suggestions.