diff options
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | main.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | # dmenu version | 1 | # dmenu version |
2 | VERSION = 2.4.2 | 2 | VERSION = 2.5 |
3 | 3 | ||
4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
5 | 5 | ||
@@ -418,7 +418,9 @@ main(int argc, char *argv[]) { | |||
418 | XModifierKeymap *modmap; | 418 | XModifierKeymap *modmap; |
419 | XSetWindowAttributes wa; | 419 | XSetWindowAttributes wa; |
420 | 420 | ||
421 | if(isatty(STDIN_FILENO)) { | 421 | if(argc == 2 && !strncmp("-v", argv[1], 3)) |
422 | eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n"); | ||
423 | else if(isatty(STDIN_FILENO)) { | ||
422 | fputs("error: dmenu can't run in an interactive shell\n", stdout); | 424 | fputs("error: dmenu can't run in an interactive shell\n", stdout); |
423 | usage(); | 425 | usage(); |
424 | } | 426 | } |
@@ -445,8 +447,6 @@ main(int argc, char *argv[]) { | |||
445 | else if(!strncmp(argv[i], "-sf", 4)) { | 447 | else if(!strncmp(argv[i], "-sf", 4)) { |
446 | if(++i < argc) selfg = argv[i]; | 448 | if(++i < argc) selfg = argv[i]; |
447 | } | 449 | } |
448 | else if(!strncmp(argv[i], "-v", 3)) | ||
449 | eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n"); | ||
450 | else | 450 | else |
451 | usage(); | 451 | usage(); |
452 | setlocale(LC_CTYPE, ""); | 452 | setlocale(LC_CTYPE, ""); |