A better mute button

Remember how I used an Automator Quick Action to set a custom “mute” shortcut on my keyboard? My new friend Ville Walveranta got in touch recently with an even better way to do it. Ville’s way preserves the pre-mute input level, so if you were previously at 50%, it’ll go back to 50% when you un-mute. Nice!

Ville’s solution uses a really great little command-line utility called switchaudio-osx. Once I had that installed, I modified my Quick Action to Run Shell Script rather than AppleScript, and I put in the command:

/opt/homebrew/bin/SwitchAudioSource -t input -m toggle

The utility gives a nice human readable output (“Setting device Logitech StreamCam to muted,” for example) so I decided to pump that straight into my notification. Works great! Thanks Ville. 😄

better-mic-toggle Automator Quick Action

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.