Files
DroidDeck/tools/linuxfs/overlay/usr/local/bin/bannerlator-steam-shim
T

20 lines
782 B
Bash
Executable File

#!/bin/bash
# `steam` on the desktop. The client writes a menu entry per installed game that runs
# `steam steam://rungameid/<id>`, and its own launchers say `steam`. On the desktop that goes
# through bannerlator-steam-launch - which runs the client on the desktop itself when it draws with
# the GPU, hands the URL to a client already running there, and asks the app for a Steam session
# on a software desktop. Anywhere else it is the client itself.
set -u
if [ "${BL_DESKTOP:-}" = 1 ]; then
url=
ui=desktop
for arg in "$@"; do
case $arg in
steam://*) url=$arg ;;
-gamepadui|-bigpicture) ui=bigpicture ;;
esac
done
exec /usr/local/bin/bannerlator-steam-launch "$ui" ${url:+"$url"}
fi
exec "${HOME:-/root}/.local/share/Steam/steamrtarm64/steam" "$@"