Skip to content
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

Run script on notification receive #38

Open
HansVanpee opened this issue Dec 14, 2021 · 4 comments
Open

Run script on notification receive #38

HansVanpee opened this issue Dec 14, 2021 · 4 comments

Comments

@HansVanpee
Copy link

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).

@Toqozz
Copy link
Owner

Toqozz commented Dec 15, 2021

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.

@HansVanpee
Copy link
Author

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.

@Toqozz
Copy link
Owner

Toqozz commented Jan 6, 2022

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.

@HansVanpee
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants