max out volume at 100%

This commit is contained in:
shark 2018-12-02 22:47:15 +00:00
parent 02db7cd8cf
commit f9cf7aded4

View File

@ -30,6 +30,9 @@ end
function getvol function getvol
killall notify-osd killall notify-osd
set vol (pactl list sinks | grep '^[[:space:]]Volume:' | head -n 1 | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,') set vol (pactl list sinks | grep '^[[:space:]]Volume:' | head -n 1 | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,')
notify-send -t 50 'Volume: '$vol'%' if [ $vol -gt '100' ]
sleep 2 set vol 100
pactl set-sink-volume 0 100%
end
notify-send -t 50 'Volume: '$vol'%'
end end