diff options
-rw-r--r-- | man/setxkbmap.man | 9 | ||||
-rw-r--r-- | setxkbmap.c | 12 |
2 files changed, 16 insertions, 5 deletions
diff --git a/man/setxkbmap.man b/man/setxkbmap.man index d002cb2..cf23d6f 100644 --- a/man/setxkbmap.man +++ b/man/setxkbmap.man @@ -24,9 +24,6 @@ only as needed. The source for all of the components can be found in .IR __xkbconfigroot__ . .SH OPTIONS .TP 8 -.B \-help -Prints a message describing the valid input to \fIsetxkbmap\fP. -.TP 8 .B \-compat \fIname\fP Specifies the name of the compatibility map component used to construct a keyboard layout. @@ -47,6 +44,9 @@ Specifies the display to be updated with the new keyboard layout. Specifies the name of the geometry component used to construct a keyboard layout. .TP 8 +.B \-help +Prints a message describing the valid input to \fIsetxkbmap\fP. +.TP 8 .B \-I \fIdirectory\fP Adds a directory to the list of directories to be used to search for specified layout or rules files. @@ -116,6 +116,9 @@ Specifies level of verbosity in output messages. Valid levels range from 0 (least verbose) to 10 (most verbose). The default verbosity level is 5. If no level is specified, each \fI-v\fP or \fI-verbose\fP flag raises the level by 1. +.TP 8 +.B \-version +Prints the program's version number. .SH USING WITH xkbcomp If you have an Xserver and a client shell running on different computers and XKB configuration files on those machines are different you can get diff --git a/setxkbmap.c b/setxkbmap.c index 070f12b..cf0f02d 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -24,6 +24,9 @@ ********************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> #include <locale.h> @@ -257,8 +260,8 @@ usage(int argc, char **argv) " -symbols <name> Specifies symbols component name\n" " -synch Synchronize request with X server\n" " -types <name> Specifies types component name\n" - " -v[erbose] [<lvl>] Sets verbosity (1..10). Higher values yield\n" - " more messages\n" + " -v[erbose] [<lvl>] Sets verbosity (1..10); higher values yield more messages\n" + " -version Print the program's version number\n" " -variant <name> Specifies layout variant used to choose component names\n", argv[0] ); @@ -472,6 +475,11 @@ parseArgs(int argc, char **argv) synch = True; else if (streq(argv[i], "-types")) ok = setOptString(&i, argc, argv, &settings.types, FROM_CMD_LINE); + else if (streq(argv[i], "-version")) + { + MSG1("setxkbmap %s\n", PACKAGE_VERSION); + exit(0); + } else if (streq(argv[i], "-verbose") || (streq(argv[i], "-v"))) { if ((i < argc - 1) && (isdigit(argv[i + 1][0]))) |