|
|
@ -4,8 +4,9 @@ |
|
|
|
# Taken from http://customlinux.blogspot.fr/2013/02/pavolumesh-control-active-sink-volume.html |
|
|
|
# and slightly adapted by lhark to work with notify-send |
|
|
|
|
|
|
|
notify='yes' |
|
|
|
notify='dunst' # no/yes/dunst |
|
|
|
notiftime='400' |
|
|
|
notifid='42' |
|
|
|
inc='2' |
|
|
|
capvol='yes' |
|
|
|
maxvol='200' |
|
|
@ -41,13 +42,13 @@ volUp () { |
|
|
|
|
|
|
|
getCurVol |
|
|
|
|
|
|
|
if [ ${notify} = 'yes' ] |
|
|
|
then |
|
|
|
if [ ${notify} = 'yes' ]; then |
|
|
|
notify-send "Volume : ${curVol}%" -t ${notiftime} |
|
|
|
elif [ "$notify" = 'dunst' ]; then |
|
|
|
dunstify -r "$notifid" -t "$notiftime" "Volume: $curVol%" |
|
|
|
fi |
|
|
|
|
|
|
|
if [ ${autosync} = 'yes' ] |
|
|
|
then |
|
|
|
if [ ${autosync} = 'yes' ]; then |
|
|
|
volSync |
|
|
|
fi |
|
|
|
} |
|
|
@ -61,6 +62,8 @@ volDown () { |
|
|
|
|
|
|
|
if [ ${notify} = 'yes' ]; then |
|
|
|
notify-send "Volume : ${curVol}%" -t ${notiftime} |
|
|
|
elif [ "$notify" = 'dunst' ]; then |
|
|
|
dunstify -r "$notifid" -t "$notiftime" "Volume: $curVol%" |
|
|
|
fi |
|
|
|
|
|
|
|
if [ ${autosync} = 'yes' ]; then |
|
|
@ -104,6 +107,8 @@ volMute () { |
|
|
|
|
|
|
|
if [ ${notify} = 'yes' ]; then |
|
|
|
notify-send "$([ "${status}" = 1 ] && echo "Sound muted" || echo "Sound unmuted")" -t ${notiftime} |
|
|
|
elif [ "$notify" = 'dunst' ]; then |
|
|
|
dunstify -r "$notifid" -t "$notiftime" "$([ "${status}" = 1 ] && echo "Sound muted" || echo "Sound unmuted")" |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|