Last active
March 14, 2021 16:47
-
-
Save nottux/cbd1d3e33e6c262ac09f542064713b11 to your computer and use it in GitHub Desktop.
Rotate drawing tablet 180 degrees on linux while using multiple or single monitor(s)
This file contains hidden or 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
bash -c 'name="HUION Huion Tablet Pen (0)";a=($(xinput list-props "$name"| grep -Po "Coordinate\sTransformation\sMatrix(.*?):\s\K.*"|tr -d ","));a[2]=$(echo ${a[0]}+${a[2]}|bc);a[5]=$(echo ${a[4]}+${a[5]}|bc);a[0]=$(echo ${a[0]}*-1|bc);a[4]=$(echo ${a[4]}*-1|bc);xinput set-prop "$name" "Coordinate Transformation Matrix" ${a[*]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for script to work you need to install
bc
remember to put your own device name instead
HUION Huion Tablet Pen Pen (0)
(you can get it by runningxinput
).This is a one liner so you can put it as a keyboard shortcut from settings