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 )