]> git.sur5r.net Git - i3/i3lock/blobdiff - i3lock.c
debian: update packaging to use dpkg-buildflags, i3lock.manpages
[i3/i3lock] / i3lock.c
index d34a56224d86413d4ea86299c31a8d0e8615b96d..2a437504cfb6d9cc08682d16d053c03b59d4f72e 100644 (file)
--- a/i3lock.c
+++ b/i3lock.c
@@ -379,6 +379,7 @@ int main(int argc, char *argv[]) {
         {"color", required_argument, NULL, 'c'},
         {"pointer", required_argument, NULL , 'p'},
         {"debug", no_argument, NULL, 0},
+        {"help", no_argument, NULL, 'h'},
 #ifndef NOLIBCAIRO
         {"image", required_argument, NULL, 'i'},
         {"tiling", no_argument, NULL, 't'},
@@ -389,14 +390,14 @@ int main(int argc, char *argv[]) {
     if ((username = getenv("USER")) == NULL)
         errx(1, "USER environment variable not set, please set it.\n");
 
-    while ((o = getopt_long(argc, argv, "vnbdc:p:"
+    while ((o = getopt_long(argc, argv, "hvnbdc:p:"
 #ifndef NOLIBCAIRO
         "i:t"
 #endif
         , longopts, &optind)) != -1) {
         switch (o) {
         case 'v':
-            errx(EXIT_SUCCESS, "version " VERSION " © 2010-2011 Michael Stapelberg\n");
+            errx(EXIT_SUCCESS, "version " VERSION " © 2010-2011 Michael Stapelberg");
         case 'n':
             dont_fork = true;
             break;
@@ -440,13 +441,13 @@ int main(int argc, char *argv[]) {
                 debug_mode = true;
             break;
         default:
-            errx(1, "i3lock: Unknown option. Syntax: i3lock [-v] [-n] [-b] [-d] [-c color] [-p win|default]"
+            errx(1, "Syntax: i3lock [-v] [-n] [-b] [-d] [-c color] [-p win|default]"
 #ifndef NOLIBCAIRO
             " [-i image.png] [-t]"
 #else
             " (compiled with NOLIBCAIRO)"
 #endif
-            "\n");
+            );
         }
     }