Don't assume deck is the username

For the shortcut creation, don't assume deck as the username. This fixes the shortcuts on desktop Linux, and if Valve ever change the username on Steam Deck specifically, you won't need to update it for new installs.
This commit is contained in:
Liam Dawe 2023-05-31 11:01:49 +01:00 committed by GitHub
parent 5707d813c0
commit 941309ec4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1946,110 +1946,110 @@ wait
if [[ -f "$epic_games_launcher_path1" ]]; then if [[ -f "$epic_games_launcher_path1" ]]; then
# Epic Games Launcher is installed at path 1 # Epic Games Launcher is installed at path 1
epicshortcutdirectory="\"$epic_games_launcher_path1\"" epicshortcutdirectory="\"$epic_games_launcher_path1\""
epiclaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" epiclaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$epic_games_launcher_path2" ]]; then elif [[ -f "$epic_games_launcher_path2" ]]; then
# Epic Games Launcher is installed at path 2 # Epic Games Launcher is installed at path 2
epicshortcutdirectory="\"$epic_games_launcher_path2\"" epicshortcutdirectory="\"$epic_games_launcher_path2\""
epiclaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/EpicGamesLauncher/\" %command%" epiclaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/EpicGamesLauncher/\" %command%"
fi fi
if [[ -f "$gog_galaxy_path1" ]]; then if [[ -f "$gog_galaxy_path1" ]]; then
# Gog Galaxy Launcher is installed at path 1 # Gog Galaxy Launcher is installed at path 1
gogshortcutdirectory="\"$gog_galaxy_path1\"" gogshortcutdirectory="\"$gog_galaxy_path1\""
goglaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" goglaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$gog_galaxy_path2" ]]; then elif [[ -f "$gog_galaxy_path2" ]]; then
# Gog Galaxy Launcher is installed at path 2 # Gog Galaxy Launcher is installed at path 2
gogshortcutdirectory="\"$gog_galaxy_path2\"" gogshortcutdirectory="\"$gog_galaxy_path2\""
goglaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher/\" %command%" goglaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/GogGalaxyLauncher/\" %command%"
fi fi
if [[ -f "$origin_path1" ]]; then if [[ -f "$origin_path1" ]]; then
# Origin Launcher is installed at path 1 # Origin Launcher is installed at path 1
originshortcutdirectory="\"$origin_path1\"" originshortcutdirectory="\"$origin_path1\""
originlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" originlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$origin_path2" ]]; then elif [[ -f "$origin_path2" ]]; then
# Origin Launcher is installed at path 2 # Origin Launcher is installed at path 2
originshortcutdirectory="\"$origin_path2\"" originshortcutdirectory="\"$origin_path2\""
originlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/OriginLauncher/\" %command%" originlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/OriginLauncher/\" %command%"
fi fi
if [[ -f "$uplay_path1" ]]; then if [[ -f "$uplay_path1" ]]; then
# Uplay Launcher is installed at path 1 # Uplay Launcher is installed at path 1
uplayshortcutdirectory="\"$uplay_path1\"" uplayshortcutdirectory="\"$uplay_path1\""
uplaylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" uplaylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$origin_path2" ]]; then elif [[ -f "$origin_path2" ]]; then
# Uplay Launcher is installed at path 2 # Uplay Launcher is installed at path 2
uplayshortcutdirectory="\"$uplay_path2\"" uplayshortcutdirectory="\"$uplay_path2\""
uplaylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/UplayLauncher/\" %command%" uplaylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/UplayLauncher/\" %command%"
fi fi
if [[ -f "$battlenet_path1" ]]; then if [[ -f "$battlenet_path1" ]]; then
# Battlenet Launcher is installed at path 1 # Battlenet Launcher is installed at path 1
battlenetshortcutdirectory="\"$battlenet_path1\"" battlenetshortcutdirectory="\"$battlenet_path1\""
battlenetlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" battlenetlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$battlenet_path2" ]]; then elif [[ -f "$battlenet_path2" ]]; then
# Battlenet Launcher is installed at path 2 # Battlenet Launcher is installed at path 2
battlenetshortcutdirectory="\"$battlenet_path2\"" battlenetshortcutdirectory="\"$battlenet_path2\""
battlenetlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/Battle.netLauncher/\" %command%" battlenetlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/Battle.netLauncher/\" %command%"
fi fi
if [[ -f "$eaapp_path1" ]]; then if [[ -f "$eaapp_path1" ]]; then
# EA App Launcher is installed at path 1 # EA App Launcher is installed at path 1
eaappshortcutdirectory="\"$eaapp_path1\"" eaappshortcutdirectory="\"$eaapp_path1\""
eaapplaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" eaapplaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$eaapp_path2" ]]; then elif [[ -f "$eaapp_path2" ]]; then
# EA App Launcher is installed at path 2 # EA App Launcher is installed at path 2
eaappshortcutdirectory="\"$eaapp_path2\"" eaappshortcutdirectory="\"$eaapp_path2\""
eaapplaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/TheEAappLauncher/\" %command%" eaapplaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/TheEAappLauncher/\" %command%"
fi fi
if [[ -f "$amazongames_path1" ]]; then if [[ -f "$amazongames_path1" ]]; then
# Amazon Games Launcher is installed at path 1 # Amazon Games Launcher is installed at path 1
amazonshortcutdirectory="\"$amazongames_path1\"" amazonshortcutdirectory="\"$amazongames_path1\""
amazonlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" amazonlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$amazongames_path2" ]]; then elif [[ -f "$amazongames_path2" ]]; then
# Amazon Games Launcher is installed at path 2 # Amazon Games Launcher is installed at path 2
amazonshortcutdirectory="\"$amazongames_path2\"" amazonshortcutdirectory="\"$amazongames_path2\""
amazonlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher/\" %command%" amazonlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/AmazonGamesLauncher/\" %command%"
fi fi
if [[ -f "$itchio_path1" ]]; then if [[ -f "$itchio_path1" ]]; then
# itchio Launcher is installed at path 1 # itchio Launcher is installed at path 1
itchioshortcutdirectory="\"$itchio_path1\"" itchioshortcutdirectory="\"$itchio_path1\""
itchiolaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" itchiolaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$itchio_path2" ]]; then elif [[ -f "$itchio_path2" ]]; then
# itchio Launcher is installed at path 2 # itchio Launcher is installed at path 2
itchioshortcutdirectory="\"$itchio_path2\"" itchioshortcutdirectory="\"$itchio_path2\""
itchiolaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/itchioLauncher/\" %command%" itchiolaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/itchioLauncher/\" %command%"
fi fi
if [[ -f "$legacygames_path1" ]]; then if [[ -f "$legacygames_path1" ]]; then
# Legacy Games Launcher is installed at path 1 # Legacy Games Launcher is installed at path 1
legacyshortcutdirectory="\"$legacygames_path1\"" legacyshortcutdirectory="\"$legacygames_path1\""
legacylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" legacylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$legacygames_path2" ]]; then elif [[ -f "$legacygames_path2" ]]; then
# Legacy Games Launcher is installed at path 2 # Legacy Games Launcher is installed at path 2
legacyshortcutdirectory="\"$legacygames_path2\"" legacyshortcutdirectory="\"$legacygames_path2\""
legacylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher/\" %command%" legacylaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/LegacyGamesLauncher/\" %command%"
fi fi
if [[ -f "$humblegames_path1" ]]; then if [[ -f "$humblegames_path1" ]]; then
# Humble Games Launcher is installed at path 1 # Humble Games Launcher is installed at path 1
humbleshortcutdirectory="\"$humblegames_path1\"" humbleshortcutdirectory="\"$humblegames_path1\""
humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$humblegames_path2" ]]; then elif [[ -f "$humblegames_path2" ]]; then
# Humble Games Launcher is installed at path 2 # Humble Games Launcher is installed at path 2
humbleshortcutdirectory="\"$humblegames_path2\"" humbleshortcutdirectory="\"$humblegames_path2\""
humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/\" %command%" humblelaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/HumbleGamesLauncher/\" %command%"
fi fi
if [[ -f "$indiegala_path1" ]]; then if [[ -f "$indiegala_path1" ]]; then
# indiegala Launcher is installed at path 1 # indiegala Launcher is installed at path 1
indieshortcutdirectory="\"$indiegala_path1\"" indieshortcutdirectory="\"$indiegala_path1\""
indielaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" indielaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$indiegala_path2" ]]; then elif [[ -f "$indiegala_path2" ]]; then
# indiegala Launcher is installed at path 2 # indiegala Launcher is installed at path 2
indieshortcutdirectory="\"$indiegala_path2\"" indieshortcutdirectory="\"$indiegala_path2\""
indielaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/IndieGalaLauncher/\" %command%" indielaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/IndieGalaLauncher/\" %command%"
fi fi
if [[ -f "$rockstar_path1" ]]; then if [[ -f "$rockstar_path1" ]]; then
# rockstar Launcher is installed at path 1 # rockstar Launcher is installed at path 1
rockstarshortcutdirectory="\"$rockstar_path1\"" rockstarshortcutdirectory="\"$rockstar_path1\""
rockstarlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%" rockstarlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/NonSteamLaunchers/\" %command%"
elif [[ -f "$rockstar_path2" ]]; then elif [[ -f "$rockstar_path2" ]]; then
# rockstar Launcher is installed at path 2 # rockstar Launcher is installed at path 2
rockstarshortcutdirectory="\"$rockstar_path2\"" rockstarshortcutdirectory="\"$rockstar_path2\""
rockstarlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/deck/.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher/\" %command%" rockstarlaunchoptions="STEAM_COMPAT_DATA_PATH=\"/home/$USER/.local/share/Steam/steamapps/compatdata/RockstarGamesLauncher/\" %command%"
fi fi