• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Revisión5b1572aabdb48ab27d12be2935b69a67466b8eb7 (tree)
Tiempo2010-02-16 07:13:25
AutorMartin Jansa <Martin.Jansa@gmai...>
CommiterTias Guns

Log Message

add script to calibrate only once and store calibration data for later
use

Original script by Martin Jansa, from the OE repository

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/scripts/xinput_calibrator_pointercal.sh
@@ -0,0 +1,23 @@
1+#!/bin/sh
2+# script to make the changes permanent (xinput is called with every Xorg start)
3+#
4+# can be used from Xsession.d
5+# script needs tee and sed (busybox variants are enough)
6+#
7+# original script: Martin Jansa <Martin.Jansa@gmail.com>, 2010-01-31
8+# updated by Tias Guns <tias@ulyssis.org>, 2010-02-15
9+
10+BINARY="xinput_calibrator"
11+CALFILE="/etc/pointercal.xinput"
12+LOGFILE="/var/log/xinput_calibrator.pointercal.log"
13+
14+if [ -e $CALFILE ] ; then
15+ echo "Using calibration data stored in $CALFILE"
16+ . $CALFILE
17+else
18+ CALDATA=`$BINARY -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
19+ if [ ! -z "$CALDATA" ] ; then
20+ echo $CALDATA > $CALFILE
21+ echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
22+ fi
23+fi