From 2f1b44daff9982237a4e1a3d581c17133f67960b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Aug 2022 14:04:01 +0200 Subject: [PATCH] updated by /home/nico/bin/sync-all-repos on blind --- rotate-by-sensor.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rotate-by-sensor.sh b/rotate-by-sensor.sh index adfa208..e655832 100755 --- a/rotate-by-sensor.sh +++ b/rotate-by-sensor.sh @@ -3,7 +3,9 @@ # Inspired by https://gist.github.com/Links2004/5976ce97a14dabf773c3ff98d03c0f61 output=$(xrandr | awk '/connected primary/ { print $1 }') -input=$(xinput --list | grep -e "Pen Pen" | sed 's/.*id=\([0-9]*\).*/\1/') +#input=$(xinput --list | grep -e "Pen" | sed 's/.*id=\([0-9]*\).*/\1/') +input_1="Wacom HID 5276 Finger" +input_2="Wacom HID 5276 Pen Pen (0x81266661)" monitor-sensor | ( while true; do @@ -38,7 +40,8 @@ monitor-sensor | ( # set -x xrandr --output ${output} --rotate ${rotate} - xinput set-prop ${input} 'Coordinate Transformation Matrix' ${matrix} + xinput set-prop "${input_1}" 'Coordinate Transformation Matrix' ${matrix} + xinput set-prop "${input_2}" 'Coordinate Transformation Matrix' ${matrix} # set +x done )