Created
December 8, 2021 02:12
-
-
Save alpiua/31c95a5f71be6bbe6ba3b91866d35dbd to your computer and use it in GitHub Desktop.
rotate touch screen with external monitors
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/sh | |
function map_to_display(){ | |
xinput map-to-output "Wacom Pen and multitouch sensor Finger touch" $1 | |
xinput map-to-output "Wacom Pen and multitouch sensor Pen stylus" $1 | |
xinput map-to-output "Wacom Pen and multitouch sensor Pen eraser" $1 | |
} | |
function rotate_touch(){ | |
xinput set-prop "Wacom Pen and multitouch sensor Finger touch" "Wacom Rotation" $1 | |
xinput set-prop "Wacom Pen and multitouch sensor Pen stylus" "Wacom Rotation" $1 | |
xinput set-prop "Wacom Pen and multitouch sensor Pen eraser" "Wacom Rotation" $1 | |
} | |
for x in $@ | |
do | |
case $x in | |
eDP1) map_to_display eDP1 ;; | |
DP1) map_to_display DP1 ;; | |
DP2) map_to_display DP2 ;; | |
normal) rotate_touch 0 ;; | |
left) rotate_touch 1 ;; | |
right) rotate_touch 2 ;; | |
invert) rotate_touch 3 ;; | |
*) exit 0 ;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment