forked from jfwells/linux-asus-t100ta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Rotation script, rotates screen clockwise
- Default X screen settings
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Name=Rotate | ||
Comment=Rotate the screen | ||
Keywords=rotate;screen; | ||
Exec=/lib/udev/asus-t100ta-rotate.sh | ||
Terminal=true | ||
Type=Application | ||
Icon=rotation-allowed-symbolic | ||
StartupNotify=true | ||
Categories=System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
TOUCHSCREEN=`xinput | grep ATML1000 | cut -f2 | cut -d= -f2` | ||
CURR_ROT=`xrandr -q --verbose | grep VGA | cut -d" " -f 6` | ||
|
||
if [ "$CURR_ROT" == "normal" ]; then | ||
ROT_TO="right" | ||
SWAP_TO="1" | ||
INV_TO="0, 1" | ||
elif [ "$CURR_ROT" == "right" ]; then | ||
ROT_TO="inverted" | ||
SWAP_TO="0" | ||
INV_TO="1, 1" | ||
elif [ "$CURR_ROT" == "inverted" ]; then | ||
ROT_TO="left" | ||
SWAP_TO="1" | ||
INV_TO="1, 0" | ||
else | ||
ROT_TO="normal" | ||
SWAP_TO="0" | ||
INV_TO="0, 0" | ||
fi | ||
|
||
xrandr --screen 0 -o $ROT_TO | ||
xinput set-int-prop $TOUCHSCREEN "Evdev Axis Inversion" 8 $INV_TO | ||
xinput set-int-prop $TOUCHSCREEN "Evdev Axes Swap" 8 $SWAP_TO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
TOUCHSCREEN=`xinput | grep ATML1000 | cut -f2 | cut -d= -f2` | ||
CURR_ROT=`xrandr -q --verbose | grep VGA | cut -d" " -f 6` | ||
|
||
# 1 1 x wrong y right | ||
# 1 0, 0, 1 x wrong y wrong | ||
|
||
|
||
if [ "$CURR_ROT" == "normal" ]; then | ||
ROT_TO="right" | ||
SWAP_TO="1" | ||
INV_TO="0, 1" | ||
elif [ "$CURR_ROT" == "right" ]; then | ||
ROT_TO="inverted" | ||
SWAP_TO="0" | ||
INV_TO="1, 1" | ||
elif [ "$CURR_ROT" == "inverted" ]; then | ||
ROT_TO="left" | ||
SWAP_TO="1" | ||
INV_TO="1, 0" | ||
else | ||
ROT_TO="normal" | ||
SWAP_TO="0" | ||
INV_TO="0, 0" | ||
fi | ||
|
||
xrandr --screen 0 -o $ROT_TO | ||
xinput set-int-prop $TOUCHSCREEN "Evdev Axis Inversion" 8 $INV_TO | ||
xinput set-int-prop $TOUCHSCREEN "Evdev Axes Swap" 8 $SWAP_TO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Section "Device" | ||
Identifier "Configured Video Device" | ||
EndSection | ||
|
||
Section "Monitor" | ||
Identifier "Configured Monitor" | ||
ModeLine "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync | ||
Option "PreferredMode" "1368x768_60.00" | ||
EndSection | ||
|
||
Section "Screen" | ||
Identifier "Configured Screen" | ||
Monitor "Configured Monitor" | ||
Device "Configured Video Device" | ||
EndSection |