Update gamescope-session/usr/share/gamescope-session-plus/sessions.d/steam

This commit is contained in:
ferreo 2025-01-05 15:33:13 +01:00
parent dd4e29b5a5
commit 23f5894ab3

View File

@ -5,8 +5,8 @@ function short_session_recover {
# remove some caches and stateful things known to cause Steam to fail to start if corrupt
rm -rf --one-file-system ~/.local/share/Steam/config/widevine
# extract the steam bootstrap to potentially fix the issue the next boot
if [[ -f "/usr/share/gamescope-session-plus/bootstraplinux_ubuntu12_32.tar.xz" ]]; then
tar xf /usr/share/gamescope-session-plus/bootstraplinux_ubuntu12_32.tar.xz -C ~/.local/share/Steam
if [[ -f "/etc/first-boot/bootstraplinux_ubuntu12_32.tar.xz" ]]; then
tar xf /etc/first-boot/bootstraplinux_ubuntu12_32.tar.xz -C ~/.local/share/Steam
fi
# change session to desktop as fallback
steamos-session-select desktop
@ -15,16 +15,13 @@ function short_session_recover {
function post_gamescope_start {
# Run steam-tweaks if exists
if command -v steam-tweaks > /dev/null; then
steam-tweaks > "${HOME}"/.steam-tweaks.log
steam-tweaks
fi
}
# Show VRR controls in Steam
export STEAM_GAMESCOPE_VRR_SUPPORTED=1
# When set to 1, a toggle will show up in the steamui to control whether dynamic refresh rate is applied to the steamui
export STEAM_GAMESCOPE_DYNAMIC_REFRESH_IN_STEAM_SUPPORTED=0
# Enable Mangoapp
export STEAM_MANGOAPP_PRESETS_SUPPORTED=1
export STEAM_USE_MANGOAPP=1
@ -76,9 +73,6 @@ export STEAM_GAMESCOPE_NIS_SUPPORTED=1
# Let steam know it can unmount drives without superuser privileges
export STEAM_ALLOW_DRIVE_UNMOUNT=1
# Allow formatting external drives
export STEAM_ALLOW_DRIVE_ADOPT=1
# We no longer need to set GAMESCOPE_EXTERNAL_OVERLAY from steam, mangoapp now does it itself
export STEAM_DISABLE_MANGOAPP_ATOM_WORKAROUND=1
@ -92,9 +86,6 @@ export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1
export STEAM_GAMESCOPE_COLOR_MANAGED=1
export STEAM_GAMESCOPE_VIRTUAL_WHITE=1
# HDMI-CEC support
export STEAM_ENABLE_CEC=0
# Set input method modules for Qt/GTK that will show the Steam keyboard
export QT_IM_MODULE=steam
export GTK_IM_MODULE=Steam
@ -106,34 +97,18 @@ fi
export CURSOR_FILE="${HOME}/.local/share/Steam/tenfoot/resource/images/cursors/arrow.png"
export XCURSOR_THEME=steam
export XCURSOR_SCALE=256
export CLIENTCMD="steam -gamepadui -steamos3 -steampal -steamdeck"
# Workaround for Steam login issue while Steam client change propagates out of Beta
touch "${HOME}"/.steam/root/config/SteamAppData.vdf || true
if [[ -f "/usr/share/gamescope-session-plus/bootstraplinux_ubuntu12_32.tar.xz" ]] && ! grep -q "set_bootstrap=1" "$STEAM_BOOTSTRAP_CONFIG"; then
if [[ -f "/etc/first-boot/bootstraplinux_ubuntu12_32.tar.xz" ]] && ! grep -q "set_bootstrap=1" "$STEAM_BOOTSTRAP_CONFIG"; then
mkdir -p ~/.local/share/Steam
tar xf /usr/share/gamescope-session-plus/bootstraplinux_ubuntu12_32.tar.xz -C ~/.local/share/Steam
tar xf /etc/first-boot/bootstraplinux_ubuntu12_32.tar.xz -C ~/.local/share/Steam
echo "set_bootstrap=1" >> "$STEAM_BOOTSTRAP_CONFIG"
fi
# Log rotate the last session
if [ -f "${HOME}"/.steam-tweaks.log ]; then
cp "${HOME}"/.steam-tweaks.log "${HOME}"/.steam-tweaks.log.old
fi
if [ -f "${HOME}"/.steam_notif_daemon-stdout.log ]; then
cp "${HOME}"/.steam_notif_daemon-stdout.log "${HOME}"/.steam_notif_daemon-stdout.log.old
fi
# If we have steam_notif_daemon binary start it
if command -v steam_notif_daemon > /dev/null; then
steam_notif_daemon > "${HOME}"/.steam_notif_daemon-stdout.log 2>&1 &
fi
# Run steam-tweaks if exists
if command -v steam-tweaks > /dev/null; then
steam-tweaks > "${HOME}"/.steam-tweaks.log
fi
steam_notif_daemon &
fi