File tree 2 files changed +20
-8
lines changed
2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 3
3
# This script fixes the screen orientation in the Desktop Mode in Bazzite-Deck KDE
4
4
# Author: d3Xt3r
5
5
6
+ SYS_ID=" $( cat /sys/devices/virtual/dmi/id/product_name) "
7
+
6
8
sleep 1
7
9
echo $( date ' +%Y-%m-%d %H:%M:%S' ) Starting Bazzite Desktop Orientation Fix script...| tee -a /tmp/bazrotfix.log
8
10
@@ -28,7 +30,11 @@ kscreen-doctor --outputs 2>&1 | tee -a /tmp/bazrotfix.log
28
30
# Fix desktop orientation
29
31
# Rotation options: right, normal, left, inverted
30
32
echo $( date ' +%Y-%m-%d %H:%M:%S' ) Fixing desktop orientation... | tee -a /tmp/bazrotfix.log
31
- kscreen-doctor output.1.rotation.left 2>&1 | tee -a /tmp/bazrotfix.log
33
+ if [[ " :83E1:" =~ " :$SYS_ID " ]]; then
34
+ kscreen-doctor output.1.rotation.left 2>&1 | tee -a /tmp/bazrotfix.log
35
+ else
36
+ kscreen-doctor output.1.rotation.normal 2>&1 | tee -a /tmp/bazrotfix.log
37
+ fi
32
38
33
39
echo $( date ' +%Y-%m-%d %H:%M:%S' ) Ending Bazzite Desktop Orientation Fix script >> /tmp/bazrotfix.log
34
40
echo -e ' \n' >> /tmp/bazrotfix.log
Original file line number Diff line number Diff line change @@ -126,15 +126,21 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam
126
126
127
127
# Legion Rotation Fix
128
128
AUTOSTART_FOLDER=${XDG_CONFIG_HOME:- $HOME / .config}
129
- if [[ " :83E1:" =~ " :$SYS_ID " ]] && [[ $BASE_IMAGE_NAME =~ " kinoite" ]]; then
130
- if [[ ! -f " $AUTOSTART_FOLDER /autostart/bazzite-handle-legion-go-rotation.desktop" ]]; then
131
- echo ' Adding legion rotation fix'
129
+
130
+ # Remove old legion-only file
131
+ if [[ -f " $AUTOSTART_FOLDER /autostart/bazzite-handle-legion-go-rotation.desktop" ]]; then
132
+ rm -f " $AUTOSTART_FOLDER /autostart/bazzite-handle-legion-go-rotation.desktop"
133
+ fi
134
+
135
+ if [[ " :ROG Ally RC71L_RC71L:83E1:" =~ " :$SYS_ID " ]] && [[ $BASE_IMAGE_NAME =~ " kinoite" ]]; then
136
+ if [[ ! -f " $AUTOSTART_FOLDER /autostart/bazzite-rotation-fix.desktop" ]]; then
137
+ echo ' Adding rotation fix'
132
138
mkdir -p " $AUTOSTART_FOLDER /autostart"
133
- printf " [Desktop Entry]\nExec=/usr/libexec/bazzite-handle-legion-go- rotation\nIcon=dialog-scripts\nName=bazzite-handle-legion-go- rotation\nType=Application\nX-KDE-AutostartScript=true\n" > " $AUTOSTART_FOLDER /autostart/bazzite-handle-legion-go- rotation.desktop"
139
+ printf " [Desktop Entry]\nExec=/usr/libexec/bazzite-rotation-fix \nIcon=dialog-scripts\nName=bazzite-rotation-fix \nType=Application\nX-KDE-AutostartScript=true\n" > " $AUTOSTART_FOLDER /autostart/bazzite-rotation-fix .desktop"
134
140
fi
135
- elif [[ -f " $AUTOSTART_FOLDER /autostart/bazzite-handle-legion-go- rotation.desktop" ]]; then
136
- echo ' Non-legion or GNOME detected, removing legionfix '
137
- rm -f " $AUTOSTART_FOLDER /autostart/bazzite-handle-legion-go- rotation.desktop"
141
+ elif [[ -f " $AUTOSTART_FOLDER /autostart/bazzite-rotation-fix .desktop" ]]; then
142
+ echo ' Non-supported or GNOME detected, removing rotaion fix '
143
+ rm -f " $AUTOSTART_FOLDER /autostart/bazzite-rotation-fix .desktop"
138
144
fi
139
145
fi
140
146
You can’t perform that action at this time.
0 commit comments