fix: set-{light,vol} calculations

This commit is contained in:
AngeD 2023-02-15 08:02:00 +01:00
parent 2c856d8606
commit fdba17e7ff
6 changed files with 6 additions and 7 deletions

View file

@ -6,7 +6,7 @@ SINK='@DEFAULT_AUDIO_SINK@'
if [ "$1" == 'm' ]; then
wpctl set-mute "$SINK" toggle
else
VOL="$((10#$(wpctl get-volume "$SINK" | tr -dc '[0-9]')))"
VOL="$((10#$(wpctl get-volume "$SINK" | tr -dc '0-9')))"
[ -n "$1" ] && VOL="$((VOL - VOL % $1))"
case "${1:0:1}" in