A bash script and a python script to launch a game using RetroArch once a controller (or other specified input device) is connected using pyudev.