diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2010-01-31 01:44:14 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2010-01-31 02:03:08 +0100 |
commit | 48dd2427c14edb8349e9f16150ad0f9c037c2ab8 (patch) | |
tree | 33b0ba3f27b771c50b38ffb4bfdcaf6935a1bc0c /recipes/xinput-calibrator/xinput-calibrator-0.5.0 | |
parent | 538671bbb993f76abd9a756caaccaf990c696b0d (diff) |
xinput-calibrator: add xinput to RDEPENDS and script to calibrate only once and store calibration data for later use
* xinput is used when we want to make the changes permanent (xinput is
called with every Xorg start
* xinput_calibrator_once.sh can be used from Xsession.d
* calibration data are stored in /etc/pointercal.xinput
* whole log from last run in /etc/pointercal.xinput.log
* script needs tee and sed (busybox variants are enough)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/xinput-calibrator/xinput-calibrator-0.5.0')
-rw-r--r-- | recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh b/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh new file mode 100644 index 0000000000..82fcfc6570 --- /dev/null +++ b/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh @@ -0,0 +1,11 @@ +#!/bin/sh +if [ -e /etc/pointercal.xinput ] ; then + echo Using calibration data stored in /etc/pointercal.xinput + . /etc/pointercal.xinput +else + CAL=`/usr/bin/xinput_calibrator | tee /etc/pointercal.xinput.log | grep xinput| sed 's/^ //g; s/$/;/g'` + if [ ! -z "$CAL" ] ; then + echo $CAL > /etc/pointercal.xinput + echo Calibration data stored in /etc/pointercal.xinput + fi +fi |