brett

disabled microphone app icon

Mic Mute for macOS

Mic Mute is a system-wide mute for macOS with a global shortcut and a clear visual indicator. It’s inspired by VCM for Windows.

Mute with the shortcut Cmd Shift A or from the system tray dropdown menu.

popup window screenshot indicating the microphone is off
Mute window follows cursor to screens and monitors

The mute indicator window will follow the cursor to desktops or screens and monitors. The system tray icon will also indicate the mute status. Once microphones are on again, the window will hide. View releases.

Update: What I use now

My journey finding the best solution for this has evolved. I now use Hammerspoon which is a delightful way to hack together MacOS scripts. The Lua scripting in Hammerspoon makes maintaining this a lot more fun than foreign functions in Rust. I’m still able to use the hotkey ⌘ ⇧ A and I’ve also mapped it to a macropad that uses F13. My script also supports Push To Talk.

Muted and unmuted indicators:

popup window screenshot indicating the microphone is off popup window screenshot indicating the microphone is on

Here’s the solution:

muteAlertId = nil
-- Clear the alert if exists to avoid notifications stacking
local function clearMuteAlert()
  if muteAlertId then
    hs.alert.closeSpecific(muteAlertId)
  end
end

-- Hold the hotkey for Push To Talk
local holdingToTalk = false
local function pushToTalk()
  holdingToTalk = true
  local audio = hs.audiodevice.defaultInputDevice()
  local muted = audio:inputMuted()
  if muted then
    clearMuteAlert()
    muteAlertId = hs.alert.show("🎤 Microphone on", true)
    audio:setInputMuted(false)
  end
end

-- Toggles the default microphone's mute state on hotkey release
-- or performs PTT when holding down the hotkey
local function toggleMuteOrPTT()
  local audio = hs.audiodevice.defaultInputDevice()
  local muted = audio:inputMuted()
  local muting = not muted
  if holdingToTalk then
    holdingToTalk = false
    audio:setInputMuted(true)
    muting = true
  else
    audio:setInputMuted(muting)
  end
  clearMuteAlert()
  if muting then
    muteAlertId = hs.alert.show("📵 Microphone muted")
  else
    muteAlertId = hs.alert.show("🎤 Microphone on")
  end
end

-- `⌘ ⇧ A` but you could also map to F13 for a macropad
hs.hotkey.bind({"cmd", "shift"}, "a", nil, toggleMuteOrPTT, pushToTalk)

Hammerspoon also makes it incredibly easy to add other utilities, such as making a hotkey to change the default audio output or input. Find the latest source in my dotfiles.