use switch and filter vol better
This commit is contained in:
@ -2,10 +2,13 @@
|
||||
CARD=$(pactl list cards short | grep '1f.3' | awk '{print $2}')
|
||||
CURRENT_SINK=$(pactl info | grep "Default Sink:")
|
||||
dunstctl close-all
|
||||
if [ "$CURRENT_SINK" = *"iec958"* ]; then
|
||||
pactl set-card-profile $CARD output:analog-stereo
|
||||
notify-send "analog out active" -i :
|
||||
else
|
||||
pactl set-card-profile $CARD output:iec958-stereo
|
||||
notify-send "digital out active" -i :
|
||||
fi
|
||||
case $CURRENT_SINK in
|
||||
*iec958*)
|
||||
pactl set-card-profile $CARD output:analog-stereo
|
||||
notify-send "analog out active" -i :
|
||||
;;
|
||||
*)
|
||||
pactl set-card-profile $CARD output:iec958-stereo
|
||||
notify-send "digital out active" -i :
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user