diff --git a/scripts/.local/share/scripts/pulseaudio-mic-mute b/scripts/.local/share/scripts/pulseaudio-mic-mute new file mode 100755 index 0000000..52ef16c --- /dev/null +++ b/scripts/.local/share/scripts/pulseaudio-mic-mute @@ -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 diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 3b8219a..e764f70 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -259,7 +259,7 @@ exec swaymsg split vertical bindsym XF86AudioRaiseVolume exec pulsemixer --change-volume +5 bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -5 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 bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10