Created
April 7, 2023 04:27
-
-
Save luisnquin/ec6d404976c638936bf4824ebd5e4799 to your computer and use it in GitHub Desktop.
Little script to mute/unmute global microphone using amixer and notify-send
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_state='' | |
if [[ $(output=$(amixer set Capture toggle); echo "$output" | grep -m 1 --fixed-strings --only-matching '[on]') ]]; then | |
microphone_state=unmuted; | |
else | |
microphone_state=muted; fi | |
notify-send "Global microphone state: $microphone_state" "Triggered by keybinding (Ctrl + Alt + M)" --app-name=System --expire-time=2500 --urgency=normal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment