PDA

View Full Version : [ubuntu] Piping a command to Notify-OSD



mrb_101
February 21st, 2016, 02:43 PM
Hey.
I was wondering how would i be able to send a notification from a shell command to pop-up a notification using the Notify-OSD.
for example increasing the volume through a command line:

$ pactl set-sink-volume 1 +5%

How can i make the notification window pop-up with an indicator of volume ?
Thanks

CantankRus
February 22nd, 2016, 05:19 PM
You could use amixer.
eg

pactl set-sink-volume 1 +5% && notify-send -i multimedia-volume-control "Volume" "$(awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master))"