Skip to content

Commit ca069b9

Browse files
committed
fix: Handle nested desktop mode a different way in rotation fix.
1 parent bfae35a commit ca069b9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

system_files/deck/shared/usr/libexec/bazzite-rotation-fix

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@
44
# Author: d3Xt3r
55

66
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
7+
IS_GAMEMODE="$(cat /proc/*/comm | grep gamescope-ses*)"
78

89
sleep 1
910
echo $(date '+%Y-%m-%d %H:%M:%S') Starting Bazzite Desktop Orientation Fix script...| tee -a /tmp/bazrotfix.log
1011

11-
IS_GAMEMODE="$(cat /proc/*/comm | grep gamescope-ses*)"
12-
13-
if [[ ! -z "$IS_GAMEMODE" ]]; then
14-
exit 0
15-
fi
16-
1712
# This bit is needed to allow enough time for the desktop to load, otherwise the fix won't work
1813
# Since Steam launches automatically in the Desktop mode in Bazzite-Deck, we can use it
1914
# to determine whether or not the desktop has loaded.
@@ -30,7 +25,9 @@ kscreen-doctor --outputs 2>&1 | tee -a /tmp/bazrotfix.log
3025
# Fix desktop orientation
3126
# Rotation options: right, normal, left, inverted
3227
echo $(date '+%Y-%m-%d %H:%M:%S') Fixing desktop orientation... | tee -a /tmp/bazrotfix.log
33-
if [[ ":83E1:" =~ ":$SYS_ID" ]]; then
28+
if [[ -z "$IS_GAMEMODE" ]]; then
29+
kscreen-doctor output.1.rotation.normal 2>&1 | tee -a /tmp/bazrotfix.log
30+
elif [[ ":83E1:" =~ ":$SYS_ID" ]]; then
3431
kscreen-doctor output.1.rotation.left 2>&1 | tee -a /tmp/bazrotfix.log
3532
else
3633
kscreen-doctor output.1.rotation.normal 2>&1 | tee -a /tmp/bazrotfix.log

0 commit comments

Comments
 (0)