i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 04b786da55407f58e97f5896e1c6f2225db9cd1a
parent eabfff3c36ccbfe0368a4392ede74a7b7eb34319
Author: Martin Pittermann <martinp2250@gmail.com>
Date:   Thu,  3 Oct 2019 14:02:19 +0200

add --no-verify option

Diffstat:
Mi3lock.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -182,6 +182,9 @@ bool blur = false;
 bool step_blur = false;
 int blur_sigma = 5;
 
+/* do not verify password */
+bool no_verify = false;
+
 uint32_t last_resolution[2];
 xcb_window_t win;
 static xcb_cursor_t cursor;
@@ -499,6 +502,11 @@ static void input_done(void) {
     unlock_state = STATE_STARTED;
     redraw_screen();
 
+    if (no_verify) {
+        ev_break(EV_DEFAULT, EVBREAK_ALL);
+        return;
+    }
+
 #ifdef __OpenBSD__
     struct passwd *pw;
 
@@ -1377,6 +1385,7 @@ int main(int argc, char *argv[]) {
         {"ignore-empty-password", no_argument, NULL, 'e'},
         {"inactivity-timeout", required_argument, NULL, 'I'},
         {"show-failed-attempts", no_argument, NULL, 'f'},
+        {"no-verify", no_argument, NULL, 'x'},
 
         // options for unlock indicator colors
         {"insidevercolor", required_argument, NULL, 300},
@@ -1544,6 +1553,9 @@ int main(int argc, char *argv[]) {
             case 'f':
                 show_failed_attempts = true;
                 break;
+            case 'x':
+                no_verify = true;
+                break;
             case 'r':
                 if (internal_line_source != 0) {
                   errx(EXIT_FAILURE, "i3lock-color: Options line-uses-ring and line-uses-inside conflict.");