mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
updated volume control to (un)mute default sink instead of sink 0
Former-commit-id: 3eedd4972f
Former-commit-id: e278f8bc70d7d74d18e7325f48752031c5d08199
Former-commit-id: ea837cf00297fc6c40114821cc31341dc543f39f
Former-commit-id: 4d5273ab0d9040458fa135d955eec81f53732cb0
This commit is contained in:
parent
bac330bb68
commit
fe327abd8d
1 changed files with 7 additions and 7 deletions
|
|
@ -14,23 +14,23 @@ MUTED_ICON=~/.config/awesome/themes/lovelace/icons/muted.png
|
||||||
NOTIF_ID=/tmp/volume-daemon-notification
|
NOTIF_ID=/tmp/volume-daemon-notification
|
||||||
|
|
||||||
if [[ "$1" = "up" ]]; then
|
if [[ "$1" = "up" ]]; then
|
||||||
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ +$STEP%
|
pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ +$STEP%
|
||||||
elif [[ "$1" = "UP" ]]; then
|
elif [[ "$1" = "UP" ]]; then
|
||||||
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ +$BIG_STEP%
|
pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ +$BIG_STEP%
|
||||||
elif [[ "$1" = "down" ]]; then
|
elif [[ "$1" = "down" ]]; then
|
||||||
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ -$STEP%
|
pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ -$STEP%
|
||||||
elif [[ "$1" = "DOWN" ]]; then
|
elif [[ "$1" = "DOWN" ]]; then
|
||||||
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ -$BIG_STEP%
|
pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ -$BIG_STEP%
|
||||||
elif [[ "$1" = "toggle" ]]; then
|
elif [[ "$1" = "toggle" ]]; then
|
||||||
pactl set-sink-mute 0 toggle
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
elif [[ "$1" = "reset" ]]; then
|
elif [[ "$1" = "reset" ]]; then
|
||||||
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ 50%
|
pactl set-sink-mute @DEFAULT_SINK@ 0 && pactl set-sink-volume @DEFAULT_SINK@ 50%
|
||||||
else
|
else
|
||||||
echo "No argument."
|
echo "No argument."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SIDEBAR_VISIBLE="$(awesome-client 'return sidebar.visible' | awk '{print $2}')"
|
SIDEBAR_VISIBLE="$(awesome-client 'return sidebar.visible' | awk '{print $2}')"
|
||||||
echo $SIDEBAR_VISIBLE
|
# echo $SIDEBAR_VISIBLE
|
||||||
if [[ "$SIDEBAR_VISIBLE" == "false" ]]; then
|
if [[ "$SIDEBAR_VISIBLE" == "false" ]]; then
|
||||||
var=$(pactl list sinks)
|
var=$(pactl list sinks)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue