I've been using a script to display a notification via notify-send that showed the volume level on my pc. (this script is called from a keybinding trigger that also lowers/raises the volume, and then reports the current volume with this script). the script is:

exec /usr/bin/notify-send " " -i notification-audio-volume-high -h int:value:"$(amixer -c "CA0106" -q | grep -A5 Master | grep '%' | cut -d'[' -f2 | cut -d']' -f1)" -h string:synchronous:volume

This worked well on Ubuntu, but doesn't seem to work properly on elementary. The notification shows, but it doesn't display the volume level, and also a new notification shows every time the button is pressed instead pf refreshing itself.

I know I can fix this because the built-in notification associated with the dedicated volume buttons works perfectly, so I guess I need to adjust my code so it works properly on elementary. can anyone give me a hand with this? how can I send an audio notification in elementary? Thanks in advance

tldr: bassically the command notify-send " " -h int:value:99 -h string:synchronous:volume is ignoring the parameter -h int:value:number

2 Answers 2


Your script gave me the solution! you can add -h string:x-canonical-private-synchronous:script to my notify-send command and it will work perfectly, thanks.

just writing this here for anyone to see, you can send int:value notifications in elementary OS by typing

notify-send " " -h string:synchronous:volume -h int:value:number -h string:x-canonical-private-synchronous:script

You could use a python script. See this snippet: https://paste.debian.net/311290

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.