wired-notify icon indicating copy to clipboard operation
wired-notify copied to clipboard

Run script on notification receive

Open HansVanpee opened this issue 4 years ago • 4 comments

It could be handy to have a script being called for each new notification. This would allow to format notification bodies that contain more than plain text (like HTML).

HansVanpee avatar Dec 14 '21 11:12 HansVanpee

I like the idea of this. Just trying to figure out how to implement it while introducing as little bloat as possible.

Something to consider is that I think Wired can already sort of do this using the print_to_file config option. You could read notification as they come in, and adjust and then send a new notification replacing the existing one using notify-call and using the ID. I agree that this could be a lot more pleasant to do though, and it doesn't help that notify-send doesn't natively support replacing.

Toqozz avatar Dec 15 '21 02:12 Toqozz

Replacing could be an option, although less elegant than pre-processing the notification with a hook. It all depends on how much work this takes to implement.

HansVanpee avatar Dec 16 '21 08:12 HansVanpee

This is only roughly related, but I just noticed that Wired mistakenly has the body-markup capability. I've removed it now which should inform programs not to send markup.

We still want to do the script thing eventually, but this might fix your intermediary issue.

Toqozz avatar Jan 06 '22 21:01 Toqozz

That can be a good solution. I'll try it out as soon as I can.

HansVanpee avatar Jan 07 '22 06:01 HansVanpee