Skip to content

Commit

Permalink
fix(legion): Update rotation direction and exit in a nested session.
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Jan 7, 2024
1 parent fea6bd5 commit 927d5b3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

0 comments on commit 927d5b3

Please sign in to comment.