1
0
Fork 0

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

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