Bluetooth reconnect script

I own a pair of BOSE QuietComfort 35 bluetooth headphones, which I use with both my laptop and my phone. This works great with Linux (not at all on Windows) but sometimes it takes a bit long for it to reconnect if I have moved out of reach for the laptop. (E.g. going for a cup of coffee). There are ways to force it to reconnect faster, using the bluetooth tray icon, but it involves clicking.