Last active
February 13, 2018 17:32
-
-
Save jigpu/f6e5600496e0edd5ec26076577d39d23 to your computer and use it in GitHub Desktop.
Transform `xinput test-xi2` multitouch output into a (potentially very wide) table of touch sequences
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
# Run me with `awk -f <progfile>` | |
/^$/ { | |
if (E=="") { | |
next; | |
} | |
for (i = 0; i < N-NN; i++) { | |
printf("%*s; %*s; %*s; %*s", 10, "", 10, "", 10, "", 10, "") | |
} | |
printf("%10.10s; %10.10s; %10.10s; %10.10s\n", N, E, A[0], A[1]); | |
} | |
/EVENT/ { | |
gsub(/[()]/,"",$4); | |
E=$4; | |
} | |
/detail:/ { | |
if (N==0) { | |
NN=$2; | |
} | |
N=$2; | |
} | |
/^ *[0-9]:/ { | |
gsub(/[ :]/,"",$1); | |
A[$1]=$2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment