blob: 80fce8bacb5dae06baace83688f57fd169c653a5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
function main {
input="$1"
touchscreen=$(xinput -list | awk -F"\t" '/Finger/ {print $1}' | tr -cd '[:alnum:] ' | xargs)
temp_dir=$(mktemp -d)
xrandr -o left &
xinput set-prop "$touchscreen" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 &
# rotate input if detected
unzip "$input" -d "$temp_dir"
# xdotool click, pinch
imv "$temp_dir"/* -f -r
xrandr -o normal &
xinput set-prop "$touchscreen" --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0
rm -r "$temp_dir"
}
main "$@"
|