This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Magic Trackpads are notoriously tough to switch between two or more Macs. | |
# You either need to use a physical cable to move the connections, or unpair it from Mac 1, unpair from Mac 2, then re-pair to the Mac you want to connect to. | |
# This script automates all that. | |
# license: MIT | |
set -euo pipefail | |
MAC_FILE="$HOME/.magic_trackpad_mac" # cache for Trackpad’s MAC address |