|
|
@ -1,7 +1,7 @@ |
|
|
|
#!/usr/bin/env sh |
|
|
|
#!/usr/bin/env sh |
|
|
|
|
|
|
|
|
|
|
|
applyptrmatrix() { |
|
|
|
applyptrmatrix() { |
|
|
|
PTRID="$( |
|
|
|
PTRID="$( |
|
|
|
xinput | grep -iE 'touchscreen.+pointer' | grep -oE 'id=[0-9]+' | cut -d= -f2 |
|
|
|
xinput | grep -iE 'touchscreen.+pointer' | grep -oE 'id=[0-9]+' | cut -d= -f2 |
|
|
|
)" |
|
|
|
)" |
|
|
|
xinput set-prop "$PTRID" --type=float --type=float "Coordinate Transformation Matrix" "$@" |
|
|
|
xinput set-prop "$PTRID" --type=float --type=float "Coordinate Transformation Matrix" "$@" |
|
|
@ -9,10 +9,12 @@ applyptrmatrix() { |
|
|
|
|
|
|
|
|
|
|
|
isrotated() { |
|
|
|
isrotated() { |
|
|
|
xrandr | grep primary | cut -d' ' -f 5 | grep right && return 0 |
|
|
|
xrandr | grep primary | cut -d' ' -f 5 | grep right && return 0 |
|
|
|
|
|
|
|
xrandr | grep primary | cut -d' ' -f 5 | grep left && return 0 |
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rotnormal() { |
|
|
|
rotnormal() { |
|
|
|
|
|
|
|
pkill "$KEYBOARD" |
|
|
|
xrandr -o normal |
|
|
|
xrandr -o normal |
|
|
|
applyptrmatrix 0 0 0 0 0 0 0 0 0 |
|
|
|
applyptrmatrix 0 0 0 0 0 0 0 0 0 |
|
|
|
pkill lisgd |
|
|
|
pkill lisgd |
|
|
@ -21,6 +23,7 @@ rotnormal() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rotright() { |
|
|
|
rotright() { |
|
|
|
|
|
|
|
pkill "$KEYBOARD" |
|
|
|
xrandr -o right |
|
|
|
xrandr -o right |
|
|
|
applyptrmatrix 0 1 0 -1 0 1 0 0 1 |
|
|
|
applyptrmatrix 0 1 0 -1 0 1 0 0 1 |
|
|
|
pkill lisgd |
|
|
|
pkill lisgd |
|
|
@ -29,6 +32,7 @@ rotright() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rotleft() { |
|
|
|
rotleft() { |
|
|
|
|
|
|
|
pkill "$KEYBOARD" |
|
|
|
xrandr -o left |
|
|
|
xrandr -o left |
|
|
|
applyptrmatrix 0 -1 1 1 0 0 0 0 1 |
|
|
|
applyptrmatrix 0 -1 1 1 0 0 0 0 1 |
|
|
|
pkill lisgd |
|
|
|
pkill lisgd |
|
|
|