Makes it more convenient to use one Apple Magic Trackpad 2 via Bluetooth on multiple devices (Mac/Linux).
Connect or disconnect with one click.
- Install dependencies:
brew install blueutil
- Add the Bluetooth address of your trackpad (e.g. 18-7e-b9-69-ff-cd) to the script. The path variable may also need to be adjusted. If the workflow is used, document.wflow inside switch-trackpad.workflow must also be modified.
- Start the script on the device that you want to disconnect the trackpad from. Then start the script on the device that you want the trackpad to connect to.
- Install dependencies:
brew install blueutil
- Edit document.wflow inside switch-trackpad.workflow: Add the Bluetooth address of your trackpad (e.g. 18-7e-b9-69-ff-cd) to the script. The path variable may also need to be adjusted.
- Add the workflow to the Touch Bar: https://support.apple.com/guide/automator/use-quick-action-workflows-aut73234890a/mac
- Start the script on the device that you want to disconnect the trackpad from. Then start the script on the device that you want the trackpad to connect to.
- Ensure that all dependencies (bluetoothctl, expect) are installed.
- Add the Bluetooth address of your trackpad (e.g. 18:7E:B9:69:FF:CD) to the script.
- You may want to use a keyboard shortcut or some other feature of your desktop environment to quickly launch the script. I use the following Gnome shell extension for this purpose: https://github.com/lucaskenda/handyscripts2
- Start the script on the device that you want to disconnect the trackpad from. Then start the script on the device that you want the trackpad to connect to.
- Simply use cables
- Use KVM software like Synergy or Barrier