Skip to main content

brett

disabled microphone app icon

Mic Mute for macOS

Mic Mute provides system-wide microphone muting on 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 menu bar.

popup window screenshot indicating the microphone is off
Mute window follows the cursor across desktops and monitors

The mute indicator window follows the cursor across desktops and monitors. The menu bar icon also shows the mute status. Once the microphone is unmuted, the window hides. View releases.


Update: What I Use Now

My preferred solution has evolved. I now use Hammerspoon, which is a delightful way to hack together macOS scripts. I store my configuration in my dotfiles. The Lua scripting in Hammerspoon makes maintaining this a lot more fun than using foreign functions in Rust. I can still use the ⌘ ⇧ A hotkey and have also mapped it to a macropad that uses F13. My script also supports push-to-talk.

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)

Muted and unmuted indicators:

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

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