diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | x-on-resize.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 12b8d54..1853db7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([x-on-resize], [0.1], +AC_INIT([x-on-resize], [0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [x-on-resize]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) diff --git a/x-on-resize.c b/x-on-resize.c index a6cdd10..55692c1 100644 --- a/x-on-resize.c +++ b/x-on-resize.c @@ -21,6 +21,7 @@ #include <unistd.h> #include <X11/Xlib.h> #include <X11/extensions/Xrandr.h> +#include "config.h" struct output_info { struct output_info *next; @@ -125,10 +126,11 @@ main (int argc, char **argv) { "auto", 0, NULL, 'a' }, { "display", 1, NULL, 'd' }, { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'v' }, { 0, 0, NULL, 0 } }; - while ((c = getopt_long(argc, argv, "c:r:d:hs", opts, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "c:r:d:hsav", opts, NULL)) != -1) { switch (c) { case 'c': config = optarg; @@ -145,9 +147,12 @@ main (int argc, char **argv) case 's': start = 1; break; + case 'v': + printf("%s\n", PACKAGE_STRING); + exit(0); case 'h': default: - fprintf(stderr, "Usage: %s --display <display> --config <config> --resize <resize> --start\n", argv[0]); + fprintf(stderr, "Usage: %s --display <display> --config <config> --resize <resize> --auto --start --version\n", argv[0]); exit(1); break; } |