[PATCH xwininfo] Improve manpage and -h option

Stéphane Aulery lkppo at free.fr
Tue Jul 2 15:29:17 PDT 2013


 - Rename windows and display args.
 - Mention of short (-d) -display option.

Signed-off-by: Stéphane Aulery <lkppo at free.fr>
---
 man/xwininfo.man |   14 +++++++-------
 xwininfo.c       |   36 ++++++++++++++++++------------------
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/man/xwininfo.man b/man/xwininfo.man
index 6da7139..2e4dadc 100644
--- a/man/xwininfo.man
+++ b/man/xwininfo.man
@@ -28,11 +28,11 @@
 xwininfo \- window information utility for X
 .SH SYNOPSIS
 .B "xwininfo"
-[\-help] [\-id \fIid\fP] [\-root] [\-name \fIname\fP] [\-int]
+[\-help] [\-id \fIwdid\fP] [\-root] [\-name \fIwdname\fP] [\-int]
 [\-children] [\-tree] [\-stats] [\-bits] [\-events] [\-size] [\-wm] [\-shape]
 [\-frame] [\-all]
 [\-english] [\-metric]
-[\-display \fIdisplay\fP]
+[\-display \fIhost:dpy\fP]
 .SH DESCRIPTION
 .PP
 .I Xwininfo
@@ -55,16 +55,16 @@ on the screen's root window.
 Print out the `Usage:' command syntax summary.
 .PP
 .TP 8
-.B "\-id \fIid\fP"
-This option allows the user to specify a target window \fIid\fP on the
+.B "\-id \fIwdid\fP"
+This option allows the user to specify a target window \fIwdid\fP on the
 command line rather than using the mouse to select the target window.
 This is very useful in debugging X applications where the target
 window is not mapped to the screen or where the use of the mouse might
 be impossible or interfere with the application.
 .PP
 .TP 8
-.B "\-name \fIname\fP"
-This option allows the user to specify that the window named \fIname\fP
+.B "\-name \fIwdname\fP"
+This option allows the user to specify that the window named \fIwdname\fP
 is the target window on the command line rather than using the mouse to
 select the target window.
 .PP
@@ -152,7 +152,7 @@ same time.
 This option is a quick way to ask for all information possible.
 .PP
 .TP 8
-.B \-display \fIdisplay\fP
+.B "\-d, \-display" \fIhost:dpy\fP
 This option allows you to specify the server to connect to; see \fIX(__miscmansuffix__)\fP.
 .SH EXAMPLE
 .PP
diff --git a/xwininfo.c b/xwininfo.c
index 39ae6ea..7f014cd 100644
--- a/xwininfo.c
+++ b/xwininfo.c
@@ -285,24 +285,24 @@ usage (void)
     fprintf (stderr,
 	     "usage:  %s [-options ...]\n\n"
 	     "where options include:\n"
-	     "    -help                print this message\n"
-	     "    -display host:dpy    X server to contact\n"
-	     "    -root                use the root window\n"
-	     "    -id windowid         use the window with the specified id\n"
-	     "    -name windowname     use the window with the specified name\n"
-	     "    -int                 print window id in decimal\n"
-	     "    -children            print parent and child identifiers\n"
-	     "    -tree                print children identifiers recursively\n"
-	     "    -stats               print window geometry [DEFAULT]\n"
-	     "    -bits                print window pixel information\n"
-	     "    -events              print events selected for on window\n"
-	     "    -size                print size hints\n"
-	     "    -wm                  print window manager hints\n"
-	     "    -shape               print shape extents\n"
-	     "    -frame               don't ignore window manager frames\n"
-	     "    -english             print sizes in english units\n"
-	     "    -metric              print sizes in metric units\n"
-	     "    -all                 -tree, -stats, -bits, -events, -wm, -size, -shape\n"
+	     "    -help                 print this message\n"
+	     "    -d[isplay] <host:dpy> X server to contact\n"
+	     "    -root                 use the root window\n"
+	     "    -id <wdid>            use the window with the specified id\n"
+	     "    -name <wdname>        use the window with the specified name\n"
+	     "    -int                  print window id in decimal\n"
+	     "    -children             print parent and child identifiers\n"
+	     "    -tree                 print children identifiers recursively\n"
+	     "    -stats                print window geometry [DEFAULT]\n"
+	     "    -bits                 print window pixel information\n"
+	     "    -events               print events selected for on window\n"
+	     "    -size                 print size hints\n"
+	     "    -wm                   print window manager hints\n"
+	     "    -shape                print shape extents\n"
+	     "    -frame                don't ignore window manager frames\n"
+	     "    -english              print sizes in english units\n"
+	     "    -metric               print sizes in metric units\n"
+	     "    -all                  -tree, -stats, -bits, -events, -wm, -size, -shape\n"
 	     "\n",
 	     program_name);
     exit (1);
-- 
1.7.10.4



More information about the xorg-devel mailing list