Commit graph

295 commits

Author SHA1 Message Date
Peter Hutterer
b87487f808 tools: restore default permissions for a source file
This was accidentally made 755 as part of e9fc59efc8

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c7b2fcd2c947b795039326583f15d29cc42a5fc5)
2017-10-30 09:42:28 +10:00
Peter Hutterer
859e09cb79 tools: remove a leftover debug printf statement
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e242ad219a)
2017-09-19 15:11:54 +10:00
Jussi Kukkonen
3dffe36854 tools: Fix race in (autotools) install
exec/data distinction is done based on install dir so compat scripts
must be moved in exec hook.

This should fix this occasional failure:
| install: cannot change permissions of
| ‘/usr/bin/libinput-debug-events.compat’: No such file or directory

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-15 09:46:52 +02:00
Peter Hutterer
945122c691 tools: tidy up the libinput man pages again
Make the libinput page more generic but suitable for short attention spans and
most importantly, point to the xf86-input-libinput man page in a more obvious
manner since we're now shadowing that.

The rest of the man pages have punctuation and formatting cleanups only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:04:11 +10:00
Peter Hutterer
5bba2dbb3f tools: add the libinput version to the man pages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-03 11:09:03 +10:00
Peter Hutterer
1d52f2f567 tools: fix invocation of subtools
One dash too many. Oops.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:44:00 +10:00
Peter Hutterer
d1b7b6267c tools: split the configuration option parsing out
We had one shared parsing function for all config options so tools parse
options that don't actually make sense (e.g. --quiet or --show-keycodes for
libinput-list-devices).

This patch splits the actual libinput device configuration out and reshuffles
everything to make use of that. One large patch, because splitting this up is
more confusing than dumping it all.

This means the actual option parsing is partially duplicated between debug-gui
and debug-events but hey, not everything in life is perfect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:43:59 +10:00
Peter Hutterer
8728b5b38f tools: shorten the --help output for the commands
The full information is now in the man page, the usage() now just tells you
how to use it. This way there's only one place to maintain it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-22 17:48:12 +10:00
Peter Hutterer
ca1edce2e1 tools: add the compat scripts installer script to the tarball
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-20 16:43:49 +10:00
Peter Hutterer
2887bb4783 tools: assert on malloc failure
No need for proper recovery here in this debugging tool.
Also sneak in a whitespace fix while we're here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 12:16:23 +10:00
Peter Hutterer
7e57123069 tools: grab the pointer in the debug gui
Because it's too annoying to trigger the hot corner every few seconds while
pointer debugging.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-15 17:46:51 +10:00
Peter Hutterer
69d0bacee9 Remove vestiges of the event-gui
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-15 17:46:51 +10:00
Peter Hutterer
2d2e523549 tools: note that the touchpad-tap measuring tool picks a touchpad
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 13:56:28 +10:00
Peter Hutterer
44b9dca9d5 tools: update the publish-doc tool to use ninja
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 12:28:37 +10:00
Peter Hutterer
c837cf8d78 tools: free the tap data on error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 08:33:12 +10:00
Peter Hutterer
5ba30f7b42 tools: add missing toffset copy from src to dest while duplicating
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 08:31:15 +10:00
Peter Hutterer
50991bd0d0 tools: point out that measuring taps may be different to what libinput sees
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-09 15:00:36 +10:00
Peter Hutterer
ce12ea6f9a tools: fix linker error with the debug-gui
Make sure we link libudev into everything that requires it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-06 17:55:14 +10:00
Peter Hutterer
56ceac34d0 tools: link libinput.la for libshared.la
Hopefully fixes the Semaphore CI build failures, apparently things are a bit
more restrictive there than in Fedora 26.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-06 15:23:22 +10:00
Peter Hutterer
5d2959aef9 tools: escape all dashes in man pages (for commands and options)
Apparently the rule is that if a dash may end up being copy/pasted, it needs
to be escaped.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
6511154705 tools: man page cleanup - lowercase all command names
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
328bc99d3b tools: add "libinput measure touchpad-tap"
This is the first tool of many more to come to enable users to gather
information aobut their devices and/or usage of these devices. Previously,
these required the users to record events, submit them to a bugzilla, have me
run various scripts over it and then decree that the scripts have spoken.
Push some of this into the hands of the users so they can query the numbers
locally and start investigating (or at least get an idea of what's happening).

This tool measures the time deltas between touch up and touch down and prints
a basic summary, together with the ability to print a dat file with the data
for visualization by e.g. gnuplot. Eventually, more of the current analysis
scripts will be moved into this or other helpers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
758ffa9c8a tools: link to the online documentation from the libinput(1) man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
4508e29a47 tools: make the libinput tool usage static
This now makes the header obsolete too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
12a364a858 tools: Reinstate libshared.la and add it to meson.build too
Removed with commit 863fd1f0eb but now that we
exec each subcommand, the previous per-target compilation flags aren't needed
anymore. Build a static library to avoid rebuilding the source files for each
target.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
2d42e87deb tools: tidy up the usage() for the tools a bit
Now that the debug-gui is a user-visible tool, make sure the usage reflects
the right command name.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
a69294251d Fold the event-gui into the libinput tool
It's common enough for users to want to debug libinput behavior without
interference by the compositor or the X server. Being able to run a GUI
without having to compile from git is helpful.

Note that this changes --enable-event-gui autotools option to
--enable-debug-gui and the event-gui mesonconf option to debug-gui.

This also drops the standalone event-gui binary in both autotools and meson.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
e9fc59efc8 tools: switch the libinput tool to be an exec-ing tool
Chaining args together inside a single binary would be nice, but it gets nasty
quickly (as I found out adding 3, 4 extra commands). Switch over to using a
git-style exec-ing command where libinput merely changes argv[0] and then
executes whatever it assembled. And those binaries can hide in libexec so they
don't clutter up the global namespace.

This also makes it a lot easier to write man pages, adopt the same style as
git uses.

Compatibilty wrapper scripts are provided for libinput-list-devices and
libinput-debug events. These warn the user about the changed command, then
exec the new one. Expect these wrappers to be removed at some point in the
future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
67000f1ae6 tools: drop event-debug
It's the same thing as libinput-debug-events and the newer "libinput
debug-events" command. The only reason it existed after we started providing
libinput-debug-events is the -no-install libtool flag that makes debugging
with gdb bearable.

Now that we're slowly moving to meson, this isn't needed anymore. If you want
to gdb directly in the source tree, build with meson.
Or use "libtool --mode=execute gdb" for an autotools build.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
d73f252f2a tools: fix minor coding style issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-26 11:15:13 +10:00
Peter Hutterer
fd4427e4ec tools: fix return codes on failure
Leftovers from an earlier version where we had booleans and more function
nesting in the mix. Fix to return integers, and also rename the function name
accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-26 11:15:01 +10:00
Peter Hutterer
f3107a78e0 tools: hook libinput-debug-events into the libinput tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-18 09:24:22 +10:00
Peter Hutterer
ed72e2bcfb tools: add a 'libinput' tool
This tool will eventually replace the different libinput tools we ship atm
with the various functionalities being commands to the single tool, rather
than multiple tools.

Right now, we still build both tools separately.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-18 09:24:18 +10:00
Peter Hutterer
d2c7f73d6d tools: rename a source file to match the future common file name paradigm
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-18 09:24:14 +10:00
Peter Hutterer
863fd1f0eb tools: drop libshared.la
Include the source files directly, we'll need per-target compiler flags that
affect different tools differently in the future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-18 09:24:10 +10:00
Peter Hutterer
235001ce0b Include config.h from event-debug.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-12 12:47:20 +10:00
Peter Hutterer
411aaa8f92 Rename man pages to .1 suffix for meson's benefit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04 13:49:37 +10:00
Peter Hutterer
60d3b6a8ed tools: update man page for debug-events --show-keycodes flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20 13:52:31 +10:00
Peter Hutterer
0f6877104e tools: fix typo in list-devices man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20 13:50:28 +10:00
Peter Hutterer
0bd36f2542 test: add color to litest verbose output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
6ba530f2d8 tools: use 'required_argument'/'no_argument' for getopt_long
See the getopt_long example, makes the code more obvious

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-24 11:42:44 +10:00
Peter Hutterer
e3d04088bd tools: print axes, but not capabilities on proximity out
Print the axis values on proximity out because it a) ensures we have the right
values and b) makes the output better aligned with the proximity in, so it's
easier to spot in a log file. But don't print the tool capabilities because
they're unrelated to the prox out anyway and again it makes the output easier
to spot.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-22 10:48:43 +10:00
Peter Hutterer
07ce6c8954 tools: fix printing of tablet coordinates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-01 09:34:46 +10:00
Peter Hutterer
1798cbdcaa tools: fix two comment typos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-27 15:24:09 +10:00
Peter Hutterer
619db3b60e Merge branch 'wip/log-function-rework' 2017-02-27 11:27:41 +10:00
Peter Hutterer
38c675c959 tools: add mode group info to libinput-list-devices
We don't cater for the special case of groups having a different number of
modes, there is no hardware right now that does that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2017-02-27 09:36:37 +10:00
Peter Hutterer
451c6913e5 tools: add "--quiet" option to only log libinput messages
Supresses any printf statements from the tool itself, i.e. it skips printing
any of the events.

Makes it easier to debug the internal state since it's not intermixed with a
whole lot of messages about the events that are generated. Best combined with
--verbose (yes, hilarious, isn't it...)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2017-02-24 16:11:46 +10:00
Peter Hutterer
765ef9a31d tools: print accel profiles up to 1000 mm/s
The range that matters is 0-200, maybe up to 400 if you account for really
fast movements. But to match other, published, accel curves default to up to
1000 mm/s. It's easy enough in gnuplot to reduce the range.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-21 15:05:07 +10:00
Peter Hutterer
a6b550cb78 tools: print the key as -1 for obfuscated keys
Missing from 8c1aa1de where we hid the human-readable parts but the keycode
itself is still enough information to recover the typed bits.
Print it as -1 as that keycode doesn't exist for real keys so it stands out
nicely.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-21 11:24:08 +10:00
Peter Hutterer
5515ecafec tools: size without decimals is good enough
Sub-mm precision isn't needed for libinput-list-devices' size field.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-20 12:11:26 +10:00