From 927d5b3eca195bd1ba4e20f7993f144d0621ac58 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sat, 6 Jan 2024 18:48:02 -0800 Subject: [PATCH] fix(legion): Update rotation direction and exit in a nested session. --- .../shared/usr/libexec/bazzite-handle-legion-go-rotation | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system_files/deck/shared/usr/libexec/bazzite-handle-legion-go-rotation b/system_files/deck/shared/usr/libexec/bazzite-handle-legion-go-rotation index 5b2fee24..58cebb22 100755 --- a/system_files/deck/shared/usr/libexec/bazzite-handle-legion-go-rotation +++ b/system_files/deck/shared/usr/libexec/bazzite-handle-legion-go-rotation @@ -6,6 +6,12 @@ sleep 1 echo $(date '+%Y-%m-%d %H:%M:%S') Starting Bazzite Desktop Orientation Fix script...| tee -a /tmp/bazrotfix.log +IS_GAMEMODE="$(cat /proc/*/comm | grep gamescope-ses*)" + +if [[ ! -z "$IS_GAMEMODE" ]]; then + exit 0 +fi + # This bit is needed to allow enough time for the desktop to load, otherwise the fix won't work # Since Steam launches automatically in the Desktop mode in Bazzite-Deck, we can use it # to determine whether or not the desktop has loaded. @@ -22,7 +28,7 @@ kscreen-doctor --outputs 2>&1 | tee -a /tmp/bazrotfix.log # Fix desktop orientation # Rotation options: right, normal, left, inverted echo $(date '+%Y-%m-%d %H:%M:%S') Fixing desktop orientation... | tee -a /tmp/bazrotfix.log -kscreen-doctor output.1.rotation.normal 2>&1 | tee -a /tmp/bazrotfix.log +kscreen-doctor output.1.rotation.left 2>&1 | tee -a /tmp/bazrotfix.log echo $(date '+%Y-%m-%d %H:%M:%S') Ending Bazzite Desktop Orientation Fix script >> /tmp/bazrotfix.log echo -e '\n' >> /tmp/bazrotfix.log