fixed backwards if statement and spaces
This commit is contained in:
+3
-3
@@ -10,10 +10,10 @@ if [[ $# -eq 1 ]]; then
|
|||||||
"up")
|
"up")
|
||||||
pactl set-sink-mute $sink false
|
pactl set-sink-mute $sink false
|
||||||
pactl set-sink-volume $sink +$step%
|
pactl set-sink-volume $sink +$step%
|
||||||
direction='increased to ';;
|
direction='increased to';;
|
||||||
"down")
|
"down")
|
||||||
pactl set-sink-volume $sink -$step%
|
pactl set-sink-volume $sink -$step%
|
||||||
direction='decreased to ';;
|
direction='decreased to';;
|
||||||
"mute")
|
"mute")
|
||||||
pactl set-sink-mute $sink toggle;;
|
pactl set-sink-mute $sink toggle;;
|
||||||
*)
|
*)
|
||||||
@@ -24,7 +24,7 @@ fi
|
|||||||
muted=`pactl list sinks | grep "Mute" | awk '{print $2}'`
|
muted=`pactl list sinks | grep "Mute" | awk '{print $2}'`
|
||||||
vol=`pactl list sinks | grep "front-left" | awk '{print $5}'`
|
vol=`pactl list sinks | grep "front-left" | awk '{print $5}'`
|
||||||
|
|
||||||
if [[ $muted == "no" ]]; then
|
if [[ $muted == "yes" ]]; then
|
||||||
twmnc -t 'volume' -c 'muted' -d 100
|
twmnc -t 'volume' -c 'muted' -d 100
|
||||||
else
|
else
|
||||||
twmnc -t 'volume' -c "${direction}${vol}" -d 100
|
twmnc -t 'volume' -c "${direction}${vol}" -d 100
|
||||||
|
|||||||
Reference in New Issue
Block a user