The only game I play on the Mac Mini connected to our TV is Cuphead.
I wanted the game to launch automatically when I turn on one of our Nimbus game controllers, which connect via Bluetooth.
This is how:
- Save the .scpt file below as e.g. ~/Library/Scripts/LaunchCupheadIfControllerIsConnected.scpt
- In the .scpt, change "Nimbus" if your Bluetooth game controllers have some other name.
- Save the .plist below as e.g. ~/Library/LaunchAgents/henrik.launch_cuphead_if_controller_is_connected.plist
- In the .plist, change
media
to whatever your username is.