feat: Refactor game station launch scripts and update session management
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user