Skip to content

Instantly share code, notes, and snippets.

@henrik242
Last active May 10, 2024 00:06
Show Gist options
  • Save henrik242/1c5010734d6993123d276c3e4d07852f to your computer and use it in GitHub Desktop.
Save henrik242/1c5010734d6993123d276c3e4d07852f to your computer and use it in GitHub Desktop.
  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
else
	set inputVolume to 0
	display notification "Volume set to 0" with title "❌ Microphone is off"
end if
set volume input volume inputVolume
  1. Save as mute-microphone
  2. Go to System Preferences -> Keyboard -> Shortcuts -> Services -> General
  3. Find the mute-microphone service and set the hotkey (e.g. control-cmd-option M)
@zaibakker
Copy link

Thanks a lot. works great for sonoma!
if you can add or explain how to add an icon in status menu item (i'm not sure about the name, near the clock). It will be perfect. I don't find yet.

mac newbie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment