A tool that automatically enables and disables Bluetooth when you (dis)connect your Mac from external displays.
Add AutoBluetooth to your Mac's Login Items (System Preferences : Users & Groups : Login Items), then log out and back in. If you disconnect all your external displays, AutoBluetooth will turn Bluetooth off. If you connect to an external display, AutoBluetooth will turn Bluetooth on.
To disable AutoBluetooth, remove it from your Login Items and log out and back in.