Love this? Please consider supporting its creator by starring or sponsoring this project on GitHub!
From the project's README:
This is an Alfred Workflow and AppleScript to close all open system alerts (iCal, etc) via a keyboard shortcut or keyword of your choice.
Download from GitHub, unzip, and double-click on the
Shhhhh.alfredworkflow file. This will add the workflow to Alfred and let you customize it.
I have also included the original AppleScript (
Shhhhh.scpt) if you prefer to install/use it via Script Editor.
For this workflow to work, you need to give Alfred system accessibility permissions. Go to
System Preferences > Security & Privacy > Accessibility and check the box next to Alfred in the section that is labeled "Allow the apps below to control your computer." Otherwise, Alfred is blocked from running the script.
This should work in earlier versions of OSX, but I've only verified it in all version since OSX Yosemite (10.10.2). Currently working in 10.12.3.
To support local testing, there is a file included (
test_notification_generator.scpt) that will generate notifications when triggered in Script Editor.
NB: This only closes alerts, not banners. (Alerts are the notifications that have close/show buttons and have to be manually closed. Banners close automatically.)
Apache2. See LICENSE.