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

Support for modifying icon #153

Open
cecilialau6776 opened this issue Aug 29, 2024 · 1 comment
Open

Support for modifying icon #153

cecilialau6776 opened this issue Aug 29, 2024 · 1 comment

Comments

@cecilialau6776
Copy link

cecilialau6776 commented Aug 29, 2024

Dunst supports modifying icons with a new icon modification. I would like to be able to add an app icon to my notification based on the app name. For example, if I get a notification from Discord or Slack, I'd like to add the corresponding app icon to the notification.

I've two proposals for this:

  1. Add a new optional property to an ImageBlock (such as override_app_icon: Option<PathBuf>)
  2. Allow for scripts to be run before a notification is displayed.

It seems that option 1 is easiest to implement, but option 2 would allow me to also modify the notification based on other criteria. For example, I'd like to be able to run a regex or a string contains on a summary, and have it omit the body of the notification; I'd like to keep certain channels private but see the rest.

@Toqozz
Copy link
Owner

Toqozz commented Nov 3, 2024

Thanks for the issue! This is a good idea. I really think we need a more dynamic approach to configuration (i.e. being able to run code at runtime) which would make a lot of these kinds of things 'just work'.

The plan is to move the configuration to Lua, and then you can have functions which fetch the icons etc using whatever logic you like. Granted, this is a longer term goal, so maybe it's worth adding something like option 1 in the meantime.

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