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


Important Note

This site features content going all the way back to 2000. The posts you’ll read reflect my views and writing style at the time. While I have gone back to clean up a few of them, I think it’s important not to sanitise too much. This site is a record of who I am and how I’ve grown. Any blog post written years ago may not reflect who I am today, nor how I would write about the same topic today.