Fix acpi volume ctl
This commit is contained in:
parent
f7040143be
commit
bdc18145ac
@ -8,20 +8,21 @@ fi
|
||||
echo "$sinks"
|
||||
|
||||
|
||||
for SINK in $sinks
|
||||
for SINK in $sinks
|
||||
do
|
||||
volume=$(echo $1 | sed "s/%//g")
|
||||
if [[ $volume =~ "+" ]] || [[ $volume =~ "-" ]]; then
|
||||
volume=$(($(pactl get-sink-volume 0 | grep -o -E "[0-9]+%" | head -1 | sed "s/%//g") $volume))
|
||||
if [[ "${volume}" =~ "-" ]]; then
|
||||
volume=$(($(pactl get-sink-volume $SINK | grep -o -E "[0-9]+%" | head -1 | sed "s/%//g") $volume))
|
||||
echo $volume
|
||||
if [[ "${volume}" =~ "-" ]]; then
|
||||
volume="0"
|
||||
fi
|
||||
if [ "${#volume}" -gt "2" ]; then
|
||||
volume="100"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echo "$volume"
|
||||
pactl set-sink-volume $SINK $volume%
|
||||
|
||||
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user