dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.42k stars 338 forks source link

Show icon randomly when no icons are provided #1322

Open rew1nter opened 3 months ago

rew1nter commented 3 months ago

default_icon is nice but the same icon for every notification is a bit boring. Can I randomly show an icon from a set of default icons?

bynect commented 3 months ago

default_icon is nice but the same icon for every notification is a bit boring. Can I randomly show an icon from a set of default icons?

At the moment you can't shuffle default icons but maybe you can hack up something with rules? For example by matching some regexes you can change the default icon (I didn't try it though)

rew1nter commented 3 months ago

Hmmmm. Can you link me to some relevant doc for this regex feature

bynect commented 3 months ago

Hmmmm. Can you link me to some relevant doc for this regex feature

In the online docs under the rules section there is an overview. Maybe you can match against the body of the notification and change the icon. It is not random as you said, but you can simulate it somehow I think

bynect commented 3 months ago

Another solution is creating a wrapper script for dunstify that adds a random icon if none is provided. This would probably be best because you have full control and true randomness!