Only the first time they are displayed, preferably (not when browsing history).
Yes, it is possible by utilizing the scripting feature of the custom overrides.
First, you need some program or script that plays the sound. This script should either ignore all command line arguments or be able to act on those passed by dunst (e.g. play_beep_sound.sh, but not play_sound /path/to/beep.wav). I use a simple shell script named alert.sh (remember to make it executable) for that:
#!/bin/sh
paplay /path/to/alert.wav
Then you need to configure a custom section in your dunstrc. If you want to play a sound on any notification, this should do:
[play_sound]
summary = "*"
script = /path/to/alert.sh
After restarting dunst (If it starts automatically, just terminating the running instance should do), it will call the script /path/to/alert.sh every time a notification summary matches the pattern *. As dunst utilized shell-like globbing this means any summary and therefore every notification.
For more information and examples, please have a look at the example dunstrc.
Awesome! Thank you so much!
I've assigned it to the text sound from Link to the Past, by the way. :)
Most helpful comment
Yes, it is possible by utilizing the scripting feature of the custom overrides.
First, you need some program or script that plays the sound. This script should either ignore all command line arguments or be able to act on those passed by
dunst(e.g.play_beep_sound.sh, but notplay_sound /path/to/beep.wav). I use a simple shell script namedalert.sh(remember to make it executable) for that:Then you need to configure a custom section in your
dunstrc. If you want to play a sound on any notification, this should do:After restarting
dunst(If it starts automatically, just terminating the running instance should do), it will call the script/path/to/alert.shevery time a notification summary matches the pattern*. Asdunstutilized shell-like globbing this means any summary and therefore every notification.For more information and examples, please have a look at the example
dunstrc.