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

Tell scripts everything you know #767

Closed
jbash opened this issue Oct 23, 2020 · 4 comments
Closed

Tell scripts everything you know #767

jbash opened this issue Oct 23, 2020 · 4 comments

Comments

@jbash
Copy link

jbash commented Oct 23, 2020

It would be nice for a script to get access to everything duntst knows about a notification. My immediate use for this would be to be able to play different sounds for notifications with different categories. Having to guess from the appname isn't ideal. Obviously there are many other possible uses.

Ideally this would include both all the notification's attributes as originally provided to dunst, and all of the attributes as subsequently modified by rules. I could imagine it also being useful for a script to know the results of various decisions dunst had made about whether and how to display the notification.

I would suggest passing this stuff via environment variables as described in #653. I don't think it completely obviates #639; the two could be useful together. Another possibility would be to provide all of these things as %-expansions in the script line, but that might be harder to use.

@fwsmit
Copy link
Member

fwsmit commented Nov 2, 2020

Maybe it's better to give the script a notification ID and make sure all the neccesary variables are available through dunstctl.
This will probably be more work though.

@fwsmit
Copy link
Member

fwsmit commented Feb 2, 2021

@jbash The PR linked above passes info about the notification via environment variables. The variables are listed in the man page. It would be a bit harder to provide the variables as they were before modified by rules, so they aren't included. Are there any specific use cases you have that would benefit from more variables being provided via environment variables?

@jbash
Copy link
Author

jbash commented Feb 3, 2021

I don't have any specific use case that would need the unrewritten variables. One can always just not rewrite them. Thanks.

@fwsmit
Copy link
Member

fwsmit commented Feb 4, 2021

Okay cool, I'll close this issue then.

@fwsmit fwsmit closed this as completed Feb 4, 2021
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