This commit is contained in:
2024-12-20 18:00:29 +09:00
commit d874be4fa6
8 changed files with 276 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -e
SYSPATH="$1"
MATRIX="$2 $3 $4 $5 $6 $7"
echo "$1 $2 $3 $4 $5 $6 $7" > /root/tcc
DEV_PATH=$(udevadm info $SYSPATH --query=property | awk -- 'BEGIN { FS="=" } { if ($1 == "DEVPATH") { print $2; exit } }')
echo "$DEV_PATH"
[ -z "$DEV_PATH" ] && exit 1
echo "ACTION!=\"remove\", SUBSYSTEM==\"input\", DEVPATH==\"$DEV_PATH\", ENV{ID_INPUT_TOUCHSCREEN}==\"1\", ENV{LIBINPUT_CALIBRATION_MATRIX}=\"$MATRIX\"" > /etc/udev/rules.d/99-touchscreen-calibration.rules

View File

@@ -0,0 +1,5 @@
#!/bin/bash
DEV_PATH="/sys"$(udevadm info /dev/input/by-path/platform-fe050000.spi-cs-1-event --query=property |\
awk -- 'BEGIN { FS="=" } { if ($1 == "DEVPATH") { print $2; exit } }')
weston-touch-calibrator "$DEV_PATH"