A macOS menu bar application that detects AirPods button presses and toggles system-wide microphone mute.
- AirPods Pro stem presses now trigger the same system-wide Core Audio input mute as the menu-bar toggle.
- The global mute continues to work while ChatGPT voice is active, so the microphone can be muted away from the Mac.
- PodsMute does not capture microphone audio or alter voice-app output volume.
- Quitting PodsMute restores the microphone to its unmuted state.
Stem-press detection uses an observed macOS audioaccessoryd event rather than a documented public notification, so a future macOS update may require the event filter to be updated.
- AirPods Max (crown button)
- AirPods Pro (stem press)
- Button Detection: Press on AirPods toggles microphone mute
- Menu Bar Integration: Shows headphones icon with colored mic badge (green = unmuted, red = muted)
- Visual Feedback: Popover appears briefly when mute state changes
- Connection Status: View AirPods connection state in the menu
- Light/Dark Mode: Icon adapts to menu bar appearance
- Restore on Quit: Microphone is restored to unmuted when app exits
- macOS 14.0+ (Sonoma)
- Xcode 15.0+
- AirPods Max or AirPods Pro (paired via Bluetooth)
PodsMute/
├── App/
│ ├── PodsMuteApp.swift # SwiftUI App entry point
│ ├── AppDelegate.swift # App lifecycle & service wiring
│ └── Info.plist # App configuration
├── UI/
│ └── StatusBarController.swift # Menu bar icon & menu
├── Services/
│ ├── AudioMuteController.swift # Core Audio mute control
│ ├── AirPodsMuteHandler.swift # Public AirPods mute callback experiment
│ └── BluetoothManager.swift # Bluetooth connection status
├── Bridge/
│ └── PodsMute-Bridging-Header.h # Bridging header for IOBluetooth
├── Resources/
│ └── Assets.xcassets/ # App icon
└── PodsMute.entitlements
-
Install xcodegen:
brew install xcodegen
-
Generate Xcode project:
xcodegen generate
-
Open in Xcode:
open PodsMute.xcodeproj
-
Build and run (Cmd+R)
- Launch the app (it appears in the menu bar with a headphones icon)
- The app automatically detects your paired AirPods
- Press the crown button (Max) or stem (Pro) to toggle microphone mute
- A popover briefly shows "Microphone On" or "Microphone Off"
- The mic badge on the icon updates:
- Green mic: Unmuted
- Red mic with slash: Muted
- Left-click: Toggle mute
- Right-click: Show menu
- Microphone status
- Toggle Mute (Cmd+M)
- AirPods connection status
- Device name
- Reconnect (Cmd+R)
- About PodsMute
- Quit (Cmd+Q)
The app runs a narrowly filtered local unified-log stream for audioaccessoryd's AAMuteStateChanged event. When that event arrives, PodsMute invokes the same Core Audio default-input-device toggle as its working menu-bar action. It doesn't open, retain, or transmit microphone audio and doesn't compete with the active voice app's audio session.
This event name is an observed macOS implementation detail rather than a documented public notification contract, so a future macOS update may require the filter to be updated.
Uses Core Audio HAL APIs:
kAudioHardwarePropertyDefaultInputDevice- Get default mickAudioDevicePropertyMute- Get/set mute state
Uses IOBluetooth to check connection status of paired AirPods devices for display purposes.
- Ensure AirPods are paired in System Settings > Bluetooth
- Connect to them at least once manually
- Restart the app
- Check System Settings > Privacy & Security > Microphone
- Ensure the app has microphone access permission
- Make sure AirPods are connected and set as input device
The icon should automatically adapt when you switch modes. If it doesn't update immediately, toggle the mute state once.
- Protocol research: librepods
MIT License