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

Support for modifying icon

Open cecilialau6776 opened this issue 1 year ago • 1 comments

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.

cecilialau6776 avatar Aug 29 '24 14:08 cecilialau6776

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.

Toqozz avatar Nov 03 '24 06:11 Toqozz