remove pointless audio bind

This commit is contained in:
Tyler Starr 2023-12-28 22:38:44 -08:00
parent 305b4dc63d
commit 1d5ef18734
2 changed files with 4 additions and 9 deletions

View File

@ -21,7 +21,6 @@ binde = , l, resizeactive, 50 0
bind = , 1, exec, ~/.config/hypr/scripts/audio-device-switcher.sh 1 $e
bind = , 2, exec, ~/.config/hypr/scripts/audio-device-switcher.sh 2 $e
bind = , 3, exec, ~/.config/hypr/scripts/audio-device-switcher.sh 3 $e
bind = , 0, exec, ~/.config/hypr/scripts/audio-device-switcher.sh 0 $e
bind = , escape, submap, reset
submap = reset

View File

@ -1,10 +1,6 @@
#!/usr/bin/env bash
#
if [[ $1 -eq 0 ]]; then
notify-send "$(pactl list sinks | awk -F': ' '/State:.*RUNNING/{getline; getline; sub("^[ \t]+", "", $2); print "Active Sink: " $2}')"
else
sink=$(pactl list sinks | grep "Sink #" | head -n $1 | tail -n 1)
card=$(pactl list sinks | grep "alsa.card_name" | head -n $1 | tail -n 1)
pactl set-default-sink $(echo $sink | cut -d "#" -f 2)
notify-send "Active Sink: $(echo $card | cut -d "\"" -f 2)"
fi
sink=$(pactl list sinks | grep "Sink #" | head -n $1 | tail -n 1)
card=$(pactl list sinks | grep "alsa.card_name" | head -n $1 | tail -n 1)
pactl set-default-sink $(echo $sink | cut -d "#" -f 2)
notify-send "Active Sink: $(echo $card | cut -d "\"" -f 2)"