Audio notification with amixer

jEsuSdA 8) listas at jesusda.com
Wed Jul 12 22:08:23 CEST 2017


El 12/07/17 a las 21:58, jEsuSdA 8) escribió:
>
> #!/bin/bash
>
> # So, you can make a script getting the volume:
>
> VOLUME=`amixer get Master | awk '$0~/%/{print $5}' | tr -d '[]%'`
>
> # Calculate the new volume:
>
> NEWVOLUME= `expr $VOLUME + 5`
>
> # Increase the volume:
>
> amixer -q set Master 5%+ unmute
>
> # Notify the change:
>
> notify-send " " -h int:value:$NEWVOLUME -i audio-volume-high
>
> # and thats all!!
>

... obviously, do the same decreasing volume, changing the "+" by "-" 
and the "-i audio-volume-high" for "-i audio-volume-low" (or other icon) ;)


More information about the Xfce mailing list