steamos script

This commit is contained in:
2025-05-29 13:55:10 +02:00
commit 31807d25c1

18
steamos-desktop-return.sh Executable file
View File

@ -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