commit 31807d25c1cded3afd0f01e501ae89a907428942 Author: Mohamed C. Date: Thu May 29 13:55:10 2025 +0200 steamos script diff --git a/steamos-desktop-return.sh b/steamos-desktop-return.sh new file mode 100755 index 0000000..b209d85 --- /dev/null +++ b/steamos-desktop-return.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash +# Check if running in a nested desktop +if [[ "$PATH" =~ nested_plasma ]]; then + # If running in a nested desktop, close the session immediately and exit + qdbus-qt6 qdbus-qt6 org.kde.Shutdown /Shutdown org.kde.Shutdown.logout + exit +fi + +# If not running in a nested desktop, continue with normal script execution +/usr/bin/steamrestart +/usr/libexec/os-session-select gamescope +if [[ ! -z $(systemctl status gdm | grep running) ]]; then + exec gnome-session-quit --no-prompt +fi +if [[ ! -z $(systemctl status sddm | grep running) ]]; then + exec qdbus-qt6 org.kde.Shutdown /Shutdown org.kde.Shutdown.logout +fi +