Question: I just got a new work laptop. I would like to seamlessly switch my bluetooth devices (headphones, magic keyboard, touchpad) between work / personal Macs without complex repairing.

Has anyone solved this problem?

Ideally, I would love it if my bluetooth devices just paired with the computer docked into my dongle that connects to my monitor / power. Like if there was some kind of USB bluetooth controller that exposed my bluetooth devices as USB devices to whatever was connected to it, that would be awesome. But I haven’t found anything like that. I’m curious if people have different solutions?

It would also be ideal if this could be used for other bluetooth devices, ie seamlessly switch headphones...

Answer: 
Well, after much playing around I was able to find something that is pretty close.
This works by installing blueutil and creating an identical automator script on both devices:

1. Install blue util (can be done via 'bower install blueutil')
2. Run `blueutil --paired` and identify device address, this is the device id used below, just substitute '-' with ':' (e.g 40:e6:4b:8d:52:12)
3. In automator Create new automation of type 'Application'
4. Add step to 'Run Shell Script'
5. Enter script (notice my shell is *zsh*, so if yours is different either install it or update command to fit your shell, such as 'if' statement of parenthesis):

```
res=$(<blueutil_folder>/blueutil --is-connected 40:e6:4b:8d:52:12)
if [[ "$res" = '1' ]]
then
<blueutil_folder>/blueutil --unpair 40:e6:4b:8d:52:12
else
<blueutil_folder>/blueutil --unpair 40:e6:4b:8d:52:12
sleep 1
<blueutil_folder>/blueutil --pair 40:e6:4b:8d:52:12
sleep 1
<blueutil_folder>/blueutil --connect 40:e6:4b:8d:52:12
fi

```
6. Save the script to desktop.
7. Copy script to second device, make sure to update the *blueutil\_folder* correctly

now, whenever you want to switch between devices run the script first on the device currently connected to keyboard and then run on the other device and viola! keyboard now connected to other device.

P.S the script sometimes hangs when trying to connect, in such case I turn off and back on the keyboard and run again.

Explanation: first it is checked if we are connected; if we are we disconnect and if not reconnect.
When disconnecting from currently connected device unpairing is done to avoid reconnect back and connection issues with other device.
When reconnecting pairing and connecting is run (unpair in beginning just in case)
Hope this helps, post a comment if it works or experienced other issues.

Good luck!
Software KVM solution such as Synergy, Across, others... But you would need permission from Work to install the software on the Work MacBook Pro.

That would work for the KB/Mouse/Trackpad but for the bluetooth headphones they would need to support multiple devices as Allen said.

Your employer may not like the idea of a software KVM. Your mileage may vary, depends on the employers IT / IT Security departments.