Created
December 3, 2016 01:56
-
-
Save JuniorJPDJ/0e5115801bdde930f7164363c984ea9d to your computer and use it in GitHub Desktop.
x220T / other tablet thinkpad rotation scripts
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
#!/bin/bash | |
case $(xrandr -q --verbose | grep LVDS1 | awk '{split($0, a); print a[5]}') in | |
"normal") | |
rotate="inverted" | |
wacom="half" | |
;; | |
*) | |
rotate="normal" | |
wacom="none" | |
;; | |
esac | |
echo "$rotate $wacom" | |
xrandr --output LVDS1 --rotate "$rotate" | |
xsetwacom --set "Wacom ISDv4 E6 Finger touch" rotate "$wacom" | |
xsetwacom --set "Wacom ISDv4 E6 Pen stylus" rotate "$wacom" | |
xsetwacom --set "Wacom ISDv4 E6 Pen eraser" rotate "$wacom" |
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
#!/bin/bash | |
case $(xrandr -q --verbose | grep LVDS1 | awk '{split($0, a); print a[5]}') in | |
"normal") | |
rotate="left" | |
wacom="ccw" | |
;; | |
"left") | |
rotate="inverted" | |
wacom="half" | |
;; | |
"inverted") | |
rotate="right" | |
wacom="cw" | |
;; | |
*) | |
rotate="normal" | |
wacom="none" | |
;; | |
esac | |
echo "$rotate $wacom" | |
xrandr --output LVDS1 --rotate "$rotate" | |
xsetwacom --set "Wacom ISDv4 E6 Finger touch" rotate "$wacom" | |
xsetwacom --set "Wacom ISDv4 E6 Pen stylus" rotate "$wacom" | |
xsetwacom --set "Wacom ISDv4 E6 Pen eraser" rotate "$wacom" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment