feat(deck): Implement desktop autologin toggle

Still allow users to use this behavior if they choose
This commit is contained in:
RJ Trujillo 2023-09-12 16:47:47 -06:00
parent e0ee78e73b
commit aad103772d
2 changed files with 11 additions and 10 deletions

View File

@ -7,9 +7,10 @@ USER=$(id -nu 1000)
# SteamOS SDDM config
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
# Configure autologin if Steam has been updated
if [[ -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
if [[ ! -f $DESKTOP_AUTOLOGIN && -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
# Avoid autologin conflict
if [[ -f ${AUTOLOGIN_CONF} ]]; then

View File

@ -32,15 +32,15 @@ setup-firefox-vaapi-nvidia:
--env=MOZ_ENABLE_WAYLAND=1 \
org.mozilla.firefox
# Enable autologin to gamescope session
enable-gamescope-autologin:
systemctl disable --now desktop-autologin
systemctl enable --now gamescope-autologin
# Enable autologin to desktop
enable-desktop-autologin:
systemctl disable --now gamescope-autologin
systemctl enable --now desktop-autologin
# Toggle between desktop/gamescope autologin
toggle-autologin:
#!/usr/bin/env bash
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
if [[ -f $DESKTOP_AUTOLOGIN ]]; then
sudo rm -f $DESKTOP_AUTOLOGIN
else
sudo touch $DESKTOP_AUTOLOGIN
fi
# Launch Waydroid configuration helper
configure-waydroid: