feat: Add scripts and systemd services for SteamOS session management and game launching

This commit is contained in:
2025-10-31 19:57:42 +01:00
parent 7a7f2711fe
commit d42d717f6c
18 changed files with 63 additions and 13 deletions
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
LOGFILE="$HOME/.local/logs/update_roms.log"
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
ROM_MANAGER_BIN="$(command -v srm || true)"
if [ -z "$ROM_MANAGER_BIN" ]; then
log "ERROR: srm (Steam ROM Manager) not found in PATH"
exit 127
fi
log "Updating Steam ROM Manager"
$ROM_MANAGER_BIN add >> "$LOGFILE" 2>&1 || {
log "ERROR: Steam ROM Manager update failed"
exit 1
}
log "Steam ROM Manager update completed successfully, restarting Steam service if running"
if systemctl --user is-active --quiet steam.scope; then
log "Restarting Steam service to apply changes"
systemctl --user restart steam.scope
log "Steam service restarted"
else
log "Steam service is not running, no need to restart"
fi