fix(gamescope-autologin): Only configure autologin if Steam has updated

This commit is contained in:
RJ Trujillo 2023-09-12 16:07:12 -06:00
parent 721f719fde
commit 34ca801fdb

View File

@ -11,6 +11,8 @@ if [[ -f ${AUTOLOGIN_CONF} ]]; then
rm -f ${AUTOLOGIN_CONF}
fi
# Configure autologin
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
# Configure autologin if Steam has been updated
if [[ -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/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
fi