3

A case in point: I have Bluetooth headphones connected to my MacBook Pro, I close the lid and want to connect headphones to my iPhone. I can't do that because the MBP ↔ headphones connection is still persisted.

How do I configure macOS so that Bluetooth is turned off or Bluetooth connections are disconnected whenever lid is closed?

I'm using macOS Mojave 10.14.5.

1

You could install blueutil and SleepWatcher via homebrew and set a .sleep code to do "/usr/local/bin/blueutil -p 0" when going to sleep mode.

To use SleepWatcher, make a shell script in your home directory named .sleep and give it permission with the chmod command.

You also can do a .wake code to turn bluetooth back on with blueutil -p 1

You can find out how to use sleepwatcher here

  • No need to use AppleScript, you can use Bash commands directly in the .sleep/.wake files. – syntagma Jul 24 at 6:05
  • Good catch, just edited my answer ! – Edd Growl Jul 25 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .