feat(session-select): added compatibility with gamescope-session-steam

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-06-09 23:56:05 +05:00
parent 5de583dda4
commit 187546dba6
2 changed files with 10 additions and 4 deletions

View File

@ -8,11 +8,13 @@ SENTINEL_FILE="gamescope-session-type"
# Determine the configuration directory
if [[ "$USER" == "root" ]] ; then
config_dir="${XDG_CONF_DIR:-"/home/$4/.config"}"
config_dir="${XDG_CONFIG_HOME:-"/home/$4/.config"}"
else
config_dir="${XDG_CONF_DIR:-"$HOME/.config"}"
config_dir="${XDG_CONFIG_HOME:-"$HOME/.config"}"
fi
mkdir -p "${config_dir}/environment.d"
[[ -f "$config_dir/$SENTINEL_FILE" ]] && source "$config_dir/$SENTINEL_FILE"
session="${1:-gamescope}"
@ -96,10 +98,14 @@ case "$session" in
fi
create_sentinel=1
;;
gamescope)
portprotonqt)
session_launcher="gamescope-session-portprotonqt"
create_sentinel=1
;;
gamescope)
session_launcher="gamescope-session-steam"
create_sentinel=1
;;
*)
die "Unrecognized session '$session'"
;;

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
/usr/bin/portproton-session-select gamescope
/usr/bin/portproton-session-select portprotonqt
CONFIG_FILE="$HOME/.config/gamescope-session-type"