12# Installs the Steam library art for the Airwaves non-Steam shortcut on a SteamOS box.3#4# PLAYWRIGHT=.../node_modules/playwright/index.mjs node build/linux/steam-art/render.mjs # re-render PNGs5# build/linux/steam-art/install.sh user@host # deck@steamdeck6#7# Copies the PNGs into the grid folder of the Steam user whose shortcuts.vdf has Airwaves,8# named by the shortcut's appid. If Steam's CEF remote debugging is on (Decky turns it on),9# it also hands the art to the running Steam client so it shows without a restart, and sets10# the shortcut's icon through Steam's API rather than editing shortcuts.vdf under it.11# NO_LIVE=1 only copies the files.12set -eu13host=${1:?usage: install.sh user@host}14dir=$(cd "$(dirname "$0")" && pwd)1516set -- $(ssh "$host" python3 - find < "$dir/steamclient.py")17grid=$1 appid=$218echo "grid $grid, appid $appid"1920ssh "$host" mkdir -p "$grid"21scp -q "$dir/capsule.png" "$host:$grid/${appid}p.png"22scp -q "$dir/header.png" "$host:$grid/${appid}.png"23scp -q "$dir/hero.png" "$host:$grid/${appid}_hero.png"24scp -q "$dir/logo.png" "$host:$grid/${appid}_logo.png"25scp -q "$dir/icon.png" "$host:$grid/${appid}_icon.png"26echo "copied art"2728if [ "${NO_LIVE:-}" = "" ] && ssh "$host" curl -sf -o /dev/null http://127.0.0.1:8080/json; then29 ssh "$host" python3 - apply "$grid" "$appid" < "$dir/steamclient.py"30else31 echo "Steam reads the grid folder when it starts, so the art shows after a Steam restart."32 echo "Set the shortcut's icon to $grid/${appid}_icon.png in its properties (or rerun with CEF debugging on)."33fi