diff --git a/README.pod b/README.pod index 489a4a9..164637c 100644 --- a/README.pod +++ b/README.pod @@ -80,9 +80,9 @@ a negative from the right side of the screen. Y is measured from the top and down respectevly. see also EXAMPLES show the notification on monitor n. -=item B<-v> +=item B<-v/--version> -Increase verbosity. Can be used multiple times. +print version information. =item B<-config file> diff --git a/config.mk b/config.mk index a79f899..61d89f6 100644 --- a/config.mk +++ b/config.mk @@ -2,6 +2,8 @@ PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man +VERSION="pre-0.3.0" + X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib diff --git a/dunst.c b/dunst.c index 86005b7..5c14310 100644 --- a/dunst.c +++ b/dunst.c @@ -112,6 +112,7 @@ l_node *most_important(list * l); void draw_win(void); void hide_win(void); void move_all_to_history(void); +void print_version(void); int cmp_notification(notification * a, notification * b) { @@ -841,6 +842,7 @@ void parse_cmdline(int argc, char *argv[]) {"config", required_argument, NULL, 'r'}, {"mod", required_argument, NULL, 'M'}, {"ns", no_argument, NULL, 'x'}, + {"version", no_argument, NULL, 'v'}, {0, 0, 0, 0} }; @@ -940,7 +942,7 @@ void parse_cmdline(int argc, char *argv[]) sort = False; break; case 'v': - verbosity++; + print_version(); break; default: usage(EXIT_FAILURE); @@ -1204,4 +1206,10 @@ void usage(int exit_status) exit(exit_status); } +void print_version(void) +{ + printf("Dunst - Dmenuish notification daemon version: %s\n", VERSION); + exit(EXIT_SUCCESS); +} + /* vim: set ts=8 sw=8 tw=0: */