feat(autologin/return-to-gamemode): Support OpenGamepadUI

This commit is contained in:
RJ Trujillo 2023-10-30 16:12:17 -06:00
parent 502872d8dd
commit 6df1c47f20
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
source /etc/default/desktop-wayland
source /etc/default/gamescope-session
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
@ -19,7 +20,7 @@ fi
# Configure autologin if Steam has been updated
if [[ ! -f ${DESKTOP_AUTOLOGIN} && -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
sed -i 's/.*Session=.*/Session='${GAMESCOPE_SESSION}'.desktop/g' ${SDDM_CONF}
elif [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
if ${DESKTOP_WAYLAND}; then
sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF}

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash
source /etc/default/gamescope-session
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
@ -12,7 +14,7 @@ AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
if [[ -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
{
echo "[Autologin]"
echo "Session=gamescope-session.desktop"
echo "Session=${GAMESCOPE_SESSION}.desktop"
} > "$AUTOLOGIN_CONF"
fi

View File

@ -0,0 +1 @@
GAMESCOPE_SESSION=gamescope-session