-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: additional script option to enable running script when paused #1362
Comments
I've spent some time looking through the code and implementing a rough patch that solves my use case and I have come to a few conclusions:
On the last point, I think some careful consideration needs to be put into how properties related to scripts work. Say for example I wanted all notifications (configured via the global rule) to have both a script that runs on notification queue insert, and a script that runs on notification display. For this use case, it might be useful to have a secondary script property, called something like My rough patch makes no changes to properties, implements |
Hello, thanks for looking into it. I agree with you, the scripting mechanism is a bit of a mess right now. Some time ago there was a pr for advanced scripting #1072. Unfortunately it was not merged. I was planning to revive it in some form when I change the rule properties handling. I'm not too sure about insert_script because it seems a little bit restrictive to add a property type for every point a script could run. But I'll to think about this through |
Thanks for the reply! That makes sense, only having two script "entry points" is probably a bit shortsighted. It was all I really needed for my own rough patch / use case, but generalizing it somehow would definitely be better in the long run I'll take a look at that PR |
Seems like my use case can be covered by the "event rule" specified in #879 and seemingly attempted in #1072, so I'll close this. I'd be happy to help work on a revisit of #1072 when work starts moving on it, so if you could mention me in whatever issue/pr that gets used, that'd be great. For now I can live with my fork |
I think we can leave it open for the time being |
It would be nice to either have an option similar to
always_run_script
to enable a script to run while dunst is paused, or have an option for a secondary script that runs when a notification is received by dunst, but not necessarily displayed due to being paused.Mentioned in #1099 although I believe this is not (and should not be) intended behavior for
always_run_script = true
as it only mentions suppressed notificationsUse case:
I have a notification widget that shows the number of waiting dunst notifications when I have dunst paused. Instead of polling dunst every second to get the waiting count, it would be nicer to let dunst alert the widget via a script.
The text was updated successfully, but these errors were encountered: