Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save srlemke/5fbd7a6414124e5a7bb029468091b2bd to your computer and use it in GitHub Desktop.

Select an option

Save srlemke/5fbd7a6414124e5a7bb029468091b2bd to your computer and use it in GitHub Desktop.
Automatically detect running game and launch simhub and dash.exe(raceroom)
#!/bin/bash
game=$(ps -aux | grep SteamLaunch | grep -oP 'AppId=\K\d+')
if [[ -z "$game" ]]; then
echo "Game variable is empty, no game running, you should not run this before running the game,
otherwise it will lock the gameprefix and steam wont be able to start it."
exit 1
fi
#launch simhub that is installed whiting game prefix:
echo "Launching SimHub..."
protontricks-launch --appid "$game" ~/.steam/steam/steamapps/compatdata/"$game"/pfx/drive_c/"Program Files (x86)"/SimHub/SimHubWPF.exe > /dev/null 2>&1 &
#run dash.exe only if game is raceroom.
if [ "$game" = "211500" ]; then
sleep 1
protontricks-launch --appid "$game" ~/Downloads/dash/dash.exe 2>&1 | grep -v -i 'fixme\|W:' 2>&1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment