Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
x220T / other tablet thinkpad rotation scripts
#!/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"
#!/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