diff --git a/wmbattery/configure.ac b/wmbattery/configure.ac index 4d2163e..dc15b2c 100644 --- a/wmbattery/configure.ac +++ b/wmbattery/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(wmbattery.c) +AC_INIT(wmbattery.c, 2.44) AC_CONFIG_HEADER(config.h) AC_CONFIG_AUX_DIR(autoconf) diff --git a/wmbattery/wmbattery.c b/wmbattery/wmbattery.c index 3a0482e..26fd283 100644 --- a/wmbattery/wmbattery.c +++ b/wmbattery/wmbattery.c @@ -314,7 +314,7 @@ char *parse_commandline(int argc, char *argv[]) char *s; while (c != -1) { - c = getopt(argc, argv, "hd:g:if:b:w:c:l:es:a:x:"); + c = getopt(argc, argv, "hd:g:if:b:w:c:l:es:a:x:v"); switch (c) { case 'h': printf("Usage: wmbattery [options]\n"); @@ -330,6 +330,7 @@ char *parse_commandline(int argc, char *argv[]) printf("\t-s granularity\tignore fluctuations less than granularity%% (implies -e)\n"); printf("\t-a file\t\twhen critical send file to /dev/audio\n"); printf("\t-x command\twhen critical execute this command\n"); + printf("\t-v\t\tdisplay version number\n"); exit(0); break; case 'd': @@ -374,6 +375,10 @@ char *parse_commandline(int argc, char *argv[]) case 'x': crit_command = strdup(optarg); break; + case 'v': + printf("wmbattery "PACKAGE_VERSION"\n"); + exit(0); + break; } }