From 31807d25c1cded3afd0f01e501ae89a907428942 Mon Sep 17 00:00:00 2001 From: "Mohamed C." Date: Thu, 29 May 2025 13:55:10 +0200 Subject: [PATCH] steamos script --- steamos-desktop-return.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 steamos-desktop-return.sh 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 +