audio-control unnecessary '$' for arithmetic variables.

This commit is contained in:
Nicolás A. Ortega Froysa 2024-12-30 18:51:37 +01:00
parent a2b2ff9441
commit 48ef0718cc

View File

@ -18,15 +18,15 @@ case $1 in
;;
"vol-up")
pactl set-sink-volume 0 +5%
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
;;
"vol-down")
pactl set-sink-volume 0 -5%
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
;;
"reset")
pactl set-sink-volume 0 50%
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
;;
"help")
echo "USAGE: audio-control <command>