19 lines
466 B
Text
Executable file
19 lines
466 B
Text
Executable file
current=$(pactl get-sink-volume @DEFAULT_SINK@ | rg [0-9]+% -o | rg -o [0-9]+ | head -n 1)
|
|
|
|
case "$1" in
|
|
"raise" ) {
|
|
if [ $current -ge 95 ];
|
|
then pactl set-sink-volume @DEFAULT_SINK@ 100%
|
|
else pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
fi
|
|
};;
|
|
"lower" ) {
|
|
if [ $current -le 5 ];
|
|
then pactl set-sink-volume @DEFAULT_SINK@ 0%
|
|
else pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
fi
|
|
};;
|
|
"toggle" ) {
|
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
};;
|
|
esac
|