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,27 @@
#!/bin/bash
set -euo pipefail
LOGFILE="$HOME/.local/logs/session.log"
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOGFILE"; }
session="${1:-gamescope}"
case "$session" in
plasma*)
log "Plasma session selected."
touch "$HOME/.desktop-session-plasma"
;;
gamescope)
log "Gamescope session selected."
if [[ -f "$HOME/.desktop-session-plasma" ]]; then
rm "$HOME/.desktop-session-plasma"
fi
;;
*)
log "!! Unrecognized session '$session'"
exit 1
;;
esac
log "Restarting graphical session service..."
sudo systemctl restart gamescope-session.service