Created
April 27, 2020 18:18
-
-
Save n-st/1eed75eaa2d53fd8430f98a228390925 to your computer and use it in GitHub Desktop.
Keyboard shortcut to mute/unmute default microphone (or other default audio source)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
notify-send \ | |
--expire-time=700 \ | |
"$(pacmd list-sources | awk 'BEGIN { FPAT = "[^ \t]+|\"[^\"]+\"" } $1 == "*" { find=1 } $1 == "device.description" { if (find) { print substr($NF,2,length($NF)-2); exit; } }')" \ | |
"→ $(amixer set Capture toggle | grep -oP '(?<=\[)o[nf]+(?=\])' | sort -u)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"microphone-toggle" | |
shift + XF86AudioMute | |
"microphone-toggle" | |
XF86AudioMicMute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment