Simplify and fix delta check

This commit is contained in:
Xavier Moffett 2025-03-22 19:36:09 -04:00
parent ec28af9a43
commit bd3a35704f
Signed by: Sapphirus
GPG key ID: A6C061B2CEA1A7AC

View file

@ -91,11 +91,10 @@ adjust() {
local delta vol op local delta vol op
# Check for valid input value # Check for valid input value
case $1 in '' | *[!0-9]*) if [[ ! $1 -gt 0 ]]; then
echo "error: Delta value must be a positive integer." echo "error: Delta value must be a positive integer."
exit 2 exit 2
;; fi
esac
# Ascertain the volume level by parsing wpctl's output # Ascertain the volume level by parsing wpctl's output
vol=$(v="$(wpctl get-volume "$sink")"; echo "${v#* }") vol=$(v="$(wpctl get-volume "$sink")"; echo "${v#* }")