xinput_calibrator
xinput_calibrator copied to clipboard
distribution packages: persist calibration
In the distribution packages, the "Calibrate Touchscreen" menu item should persist the calibration in a way which is appropriate to the distribution.
Perhaps ask the user "Apply calibration system wide or just for this user?"
xinput_calibrator could have a "raw" output mode for each output type in which only needed code is outputed and can be redirected to a file.
Example: xinput_calibrator --output-type xorg.conf.d > /usr/share/X11/xorg.conf.d/99-touch-calibration
Yes, perhaps an argument like --output-file OUTFILE would be a good idea.
A recent distribution would naturally choose to use the xorg.conf.d mechanism and have it save snippets in the correct directory (file? one file, multiple files?)
One open issue there is that the (sysfs!) name of the touchscreen can not always be detected. (in fact, only if it is the same as the xinput name, which is the case in most cases; unless you have a wicked evdev config which renames stuff).
I was about to open a new issue for the output issue when I stumbled onto this one. A --output xorg-file would be really helpfull!
Indeed.
Yes, this is long due.
If anybody wants to quickly do this himself, I would very grateful!
The code is pretty much ready for it: https://github.com/tias/xinput_calibrator/blob/master/src/calibrator/calibratorEvdev.cpp#L465
It would be a matter of giving the output_* functions a FILE argument (which can be STDOUT or a real file handler) and printing to that...