Three changes:
- Extend device name padding to 32 characters, 16 isn't enough for
  auto-assigned names.
- list the type as "type: <type>" instead of directly after the device name.
- list the device ID as well

The three fields (name, id and type) are separated by tab characters to ease
parsing. Example output is:

Wacom Intuos4 6x9 eraser                id: 12  type: ERASER
Wacom Intuos4 6x9 cursor                id: 13  type: CURSOR
Wacom Intuos4 6x9 pad                   id: 14  type: PAD
Wacom Intuos4 6x9 stylus                id: 15  type: STYLUS

Signed-off-by: Peter Hutterer <[email protected]>
---
 tools/xsetwacom.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 84dd188..5b7d29d 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -847,7 +847,9 @@ static void list_one_device(Display *dpy, XDeviceInfo *info)
                        if (nitems)
                        {
                                type_name = XGetAtomName(dpy, *(Atom*)data);
-                               printf("%-16s %-10s\n", info->name, type_name);
+                               printf("%-32s   id: %ld type: %-10s\n",
+                                               info->name, info->id,
+                                               type_name);
                        }
 
                        XFree(data);
-- 
1.7.3.2


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to