Disconnects Bluetooth audio devices when your Mac screen locks and prevents them from reconnecting until you unlock. Input devices (keyboard, mouse) stay connected the entire time.
When you lock your Mac near shared Bluetooth headphones or speakers, those audio devices can still connect to it. This tool prevents that by disconnecting audio devices on lock and rejecting any audio connection attempts while locked.
brew tap alexcarol/mac-screen-lock-audio-drop https://github.com/alexcarol/mac-screen-lock-audio-drop
brew install screen-lock-audio-drop && brew services start screen-lock-audio-dropgit clone https://github.com/alexcarol/mac-screen-lock-audio-drop.git
cd mac-screen-lock-audio-drop
./setup.shbrew uninstall screen-lock-audio-drop./uninstall.shThe tool listens for macOS screen lock/unlock notifications and uses the IOBluetooth framework to:
- On lock: disconnect all connected audio devices and start monitoring for new connections
- While locked: automatically disconnect any audio device that tries to connect
- On unlock: stop monitoring, allowing audio devices to connect freely again
Bluetooth itself stays on, so peripherals like keyboards and mice are never interrupted.
The first time you lock your screen after installing, macOS will prompt for Bluetooth access. Unlock your Mac and allow the permission for the tool to work. If you miss the prompt, grant it manually in System Settings > Privacy & Security > Bluetooth.
- macOS
- Xcode Command Line Tools (for building from source)
MIT