Jump to content

Banner Be Gone — Close notification alerts

Recommended Posts

When reporting issues, please include your exact installed versions of:

  • The Workflow.
  • Alfred.
  • macOS.

In addition to:

  • The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.
  • Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.

Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better.

Link to comment
  • 3 months later...

I love this workflow! However, it doesn't quite dismiss all notifications. For example, if I have a Slack notification, instead of closing the notification, it toggles the reply state of the notification (which allows a quick reply to the Slack message). 


I updated the code in the workflow to run banner.perform() twice and that usually dismissed everything.


However, that probably isn't the best way to do it. 




Link to comment

Thank you for the kind words.

Due to the nature of the operation, the alternative would be to check all possible actions on every banner then perform on the one whose name indicates it closes the notification. However, that is considerably slower and it would require getting the names of the Close and Clear All operations in every language, which either requires configuration or becoming even slower. I spent a ton of time on that.

In other words, there’s always a trade-off. I picked the least annoying one. Maybe you can change Slack’s notification type to be different?

Link to comment
  • 2 weeks later...

Thanks for the workflow. But I'm getting error message; running on latest Alfred and MacOS.


ERROR: Banner Be Gone[Run Script] /Users/mac1/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/47616846-5A63-432A-B974-55E7749E5800: execution error: Error: Error: Invalid index. (-1719)

Link to comment
9 hours ago, iApple said:

running on latest Alfred and MacOS.


Please always share the exact version. Developers are often on different releases from users and “latest” is fuzzy (latest beta, stable, pre-release?). Plus, it makes it harder for others who arrive later to identify if the issue applies to them. To provide informed help it is imperative that we work with precise information.

Also, for this I’ll need a screen recording of it happening, with the debugger open.

Link to comment
  • 4 weeks later...

workflow version: 2023.2



[15:02:32.566] Logging Started...
[15:02:36.122] Banner Be Gone[Keyword] Processing complete
[15:02:36.128] Banner Be Gone[Keyword] Passing output '' to Run Script
[15:02:36.293] ERROR: Banner Be Gone[Run Script] /Users/<USER>/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/7DCFD641-6A1E-4799-B550-AF03A71B2800: execution error: Error: Error: Invalid index. (-1719)



screen recording https://www.dropbox.com/scl/fi/wdr3dpyaee3a8mhwqeei9/video.mp4?rlkey=q0v7v77s3cjn2479nmrbvj4zw&dl=0


@vitor Any way to fix this?

Edited by andy4222
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...