feat: Refactor game station launch scripts and update session management

This commit is contained in:
2025-10-27 00:06:05 +01:00
parent adc893de6e
commit 49de842b57
8 changed files with 147 additions and 45 deletions
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
LOGFILE="$HOME/.local/logs/desktop.log"
export PATH="$HOME/.local/bin:$PATH"
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
DESKTOP_BIN="$(command -v startplasma-wayland || true)"
if [ -z "$DESKTOP_BIN" ]; then
log "ERROR: startplasma-wayland not found in PATH"
exit 127
fi
log "Launching Plasma: $DESKTOP_BIN"
exec $DESKTOP_BIN >>"$LOGFILE" 2>&1 &
sleep 5
systemd-run --user --slice=sunshine.slice --scope sunshine >>"$LOGFILE" 2>&1 || {
log "ERROR: Failed to start Sunshine"
exit 1
} &
tail -f /dev/null