dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Modify all notification properties from script/rules

Open emptymess opened this issue 4 years ago • 3 comments

When using rules with messaging apps like Rochet.Chat, I would like to be able to capture specific notifications using wildcards and setting stack tags according to the trigger, e.g :

[my-app]
    summary = "example-summary*"
    set_stack_tag = "%s"

Notification > example-summary-foobar Stack tag >> example-summary-foobar

or even :

[my-app]
    summary = "ex(am)ple-summary-(*)"
    set_stack_tag = "%1-%2"

Notification > example-summary-foobar Stack tag >> am-foobar

This would allow modifying notifications dynamically with the help of just one rule and without scripting.

emptymess avatar Sep 01 '21 17:09 emptymess

This would allow modifying notifications dynamically with the help of just one rule and without scripting.

I'd say there's nothing wrong with scripting for these more advanced use cases. The problem is that I believe one can't modify the notification's stack tag or any other properties from a script.

fwsmit avatar Sep 03 '21 09:09 fwsmit

Well technically from script you could take the properties of a notification, process those properties, kill the processed notification from id and then spawn a corrected notification although it seems a bit overkill.

emptymess avatar Sep 03 '21 10:09 emptymess

Yeah editing a notification's properties from the script seems like the right choice here. It's not something I'm planning to implement soon tho

fwsmit avatar Sep 06 '21 21:09 fwsmit