Work around mic pulseaudio ID value with a script

This commit is contained in:
coolneng 2021-04-19 14:08:46 +02:00
parent 25c56a6117
commit eb68cc2353
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#!/bin/sh
pulsemixer $(\
pulsemixer --list-sources |\
grep Default |\
awk -v args="$args" '{
gsub(/,$/,"",$3);
cmdargs = cmdargs"--id "$3" "args" "
} END {
print cmdargs
}'
) --toggle-mute

View File

@ -259,7 +259,7 @@ exec swaymsg split vertical
bindsym XF86AudioRaiseVolume exec pulsemixer --change-volume +5 bindsym XF86AudioRaiseVolume exec pulsemixer --change-volume +5
bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -5 bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -5
bindsym XF86AudioMute exec pulsemixer --toggle-mute bindsym XF86AudioMute exec pulsemixer --toggle-mute
bindsym XF86AudioMicMute exec pulsemixer --id source-43 --toggle-mute bindsym XF86AudioMicMute exec ~/.local/share/scripts/pulseaudio-mic-mute
# Brightness # Brightness
bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessUp exec light -A 10
bindsym XF86MonBrightnessDown exec light -U 10 bindsym XF86MonBrightnessDown exec light -U 10