Menu Bar Microphone Mute Toggle & Visual Indicator

Why is everyone talking over me today? How rude!

Ohhh for #$%&'s sake...

"Sorry guys! I didn't realize I was muted this whole time."

Problem Solved:

Mic Mute Toggle & Icon Indicator in Menubar


Screen Shot 2023-02-23 at 1.45.19 AM


  • Visual Awareness of Mic Status
  • Toggle Mic On/Off by Clicking the Icon
  • Toggle Mic On/Off with Any Action You Want

MenuBarMicToggle.bttpreset (50.8 KB)


Background & Details

I just wanted a simple microphone toggle and visual indicator for the Menubar which I could interact with using either a keyboard shortcut or a click.

There are many presets that include such things for Touchbar, but I don't have a Touchbar.

There are fancy preset packages which include things like this alongside a ton of other gizmos, but I don't want 9 features I'll never touch just for the one feature I actually do want. Nor did I want to have to access it through some context menu.

Anyways, this preset consists of two dead-simple Apple Scripts - one in a Menubar Item called MicToggleIcon, and the other in a Named Trigger called Mic Toggle.


Apple Scripts Used

Named Trigger: Mic Toggle

on getMicrophoneVolume()
	input volume of (get volume settings)
end getMicrophoneVolume
on disableMicrophone()
	set volume input volume 0
end disableMicrophone
on enableMicrophone()
	set volume input volume 65
end enableMicrophone

if getMicrophoneVolume() is greater than 0 then
	disableMicrophone()
else
	enableMicrophone()
end if

Change the "65" value to whatever you prefer. That's just where my microphone works best. Most apps (especially for virtual meetings) automatically adjust this once your value is above 0 anyways.

Menubar Item: MicToggleIcon

on getMicrophoneVolume()
	input volume of (get volume settings)
end getMicrophoneVolume

if getMicrophoneVolume() is greater than 0 then
	return "False"
else
	return "True"
end if

The Menubar Icon has the Mic Toggle as an Action, which is triggered by clicking the icon. You can additionally create any other Trigger you want (such as a key shortcut) and set the Action to Named Trigger: Mic Toggle.

Doing one thing and doing it well. That's how I like things on my TouchBar.

This is an absolute gem. Thank you very much :pray:t3:

I'm always on the hunt for simple scripts like this, as I don't have the knowledge to write them myself.

1 Like

Doing one thing and doing it well. That's how I like things on my TouchBar.

Dry & modular - that's the basis for any good software!

I'm always on the hunt for simple scripts like this, as I don't have the knowledge to write them myself.

While I do know how to code in a couple other languages, I had never touched Apple Scripts before this to be honest. And all I did here was like 3 Google searches.

Point is, you might surprise yourself with what you can duct-tape together after a few Google searches! Or, probably better yet, a couple ChatGPT queries nowadays. Any honest developer will tell you that reading StackOverflow and documentation is like 90% of what they do.

As long as you stick to simple functionality and apply even minimal commonsense, it's fairly easy to not do anything dangerous.

1 Like

@anon thank you very much for this preset.

I recognized that this doesn't work with external microphones only with the internal one.

Hmm.. what do you mean by external exactly? I use it with headphones connected via USB, AirPods, etc. Regardless of which audio input device you have selected, there is only ever one microphone volume level as far as MacOS is concerned. How is your mic connected?

Hi,
I try to give a litte bit more detail.
Most times I'm using my internal MacBookAir M1 microphone but sometimes the Jabra Speak 510 which is connected via USB, without extra drivers.

I'm using Microsoft "Teams classic".app

  1. Screenshot: Internal mic turned on
  2. Screenshot: Internal mic turned off. Correct status in BTT but not in Teams
  3. Screenshot: External mic turned on
  4. Screenshot: External mic turned off (via external button), Correct status in Teams but not in BTT

If I'm using the external mic, I can change the status of BTT but it has no effect to the external mic.

Bildschirmfoto 2023-11-10 um 08.35.46
Bildschirmfoto 2023-11-10 um 08.35.54
Bildschirmfoto 2023-11-10 um 08.37.04
Bildschirmfoto 2023-11-10 um 08.37.14