Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [no longer maintained] |
| 2 | |
| 3 | From 93abf28d602da637376b78de8c88b7ab5cf13b4f Mon Sep 17 00:00:00 2001 |
| 4 | From: Jonathan David <jonathan.david@ni.com> |
| 5 | Date: Mon, 30 Nov 2015 12:12:20 -0600 |
| 6 | Subject: [PATCH] add geometry input when calibrating |
| 7 | |
| 8 | Send monitor geometry to xinput_calibrator when running the script |
| 9 | |
| 10 | Signed-off-by: Jonathan David <jonathan.david@ni.com> |
| 11 | --- |
| 12 | scripts/xinput_calibrator_pointercal.sh | 5 ++++- |
| 13 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh |
| 16 | index 0ada7da..6a3aded 100755 |
| 17 | --- a/scripts/xinput_calibrator_pointercal.sh |
| 18 | +++ b/scripts/xinput_calibrator_pointercal.sh |
| 19 | @@ -37,7 +37,10 @@ done |
| 20 | |
| 21 | [ "$USER" != "root" ] && CALFILE=$USER_CALFILE |
| 22 | |
| 23 | -CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'` |
| 24 | +read RESOLUTION <<< $(xrandr | awk -F '[[:space:]+]' '/ connected/ \ |
| 25 | + { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }') |
| 26 | + |
| 27 | +CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'` |
| 28 | if [ ! -z "$CALDATA" ] ; then |
| 29 | echo $CALDATA > $CALFILE |
| 30 | echo "Calibration data stored in $CALFILE (log in $LOGFILE)" |
| 31 | -- |
| 32 | 1.9.1 |
| 33 | |