From 99d06b4090a013e3912d9a4e5e1c717e3f5b87ce Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Feb 2021 10:38:06 +1000 Subject: tools: add a libwacom-show-stylus tool to easily check for stylus IDs (#340) This is an interactive tool to allow users to easily find their stylus IDs. libinput debug-tablet provides something similar but it's useful to have this as part of our own repository. After ctrl+c it prints a suggested Styli line with the set of groups that belong to this tablet. This is the quick-and-dirty version, probably good enough for most cases. Example output from running without arguments: $ sudo libwacom-show-stylus Using "Wacom Intuos Pro M Pen": /dev/input/event23 Tool id 0x842 serial 0x748012bf in-proximity: False Tool id 0x84a serial 0x748012bf in-proximity: False ^CTerminating Suggested line for .tablet file: Styli=mobilestudio Nice side-effect: where a prefix is configured but does not (yet) have files in it, we fall back to the default /usr/share. Too niche to worry about, imo. Signed-off-by: Peter Hutterer --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 6d9552f..8036efb 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,7 @@ project('libwacom', 'c', default_options: [ 'c_std=gnu99', 'warning_level=2' ], meson_version: '>= 0.50.0') +dir_bin = join_paths(get_option('prefix'), get_option('bindir')) dir_data = join_paths(get_option('prefix'), get_option('datadir'), 'libwacom') dir_etc = join_paths(get_option('prefix'), get_option('sysconfdir'), 'libwacom') dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1') @@ -172,6 +173,15 @@ install_man(configure_file(input: 'tools/libwacom-list-local-devices.man', output: '@BASENAME@.1', copy: true)) +showstylus_config = configuration_data() +showstylus_config.set('DATADIR', dir_data) +showstylus_config.set('ETCDIR', dir_etc) +configure_file(output: 'libwacom-show-stylus', + input: 'tools/show-stylus.py', + configuration: showstylus_config, + install_dir: dir_bin, + install: true) + ############### docs ########################### docs_feature = get_option('documentation') doxygen = find_program('doxygen', required: docs_feature) -- cgit v1.2.1