i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 4038f9d14acb89f065534b739c71cced4910c180
parent fcb46c7cd880121a5e3590659705641cf8014bcc
Author: Raymond Li <hi@raymond.li>
Date:   Tue, 10 Mar 2020 18:06:38 -0400

Merge pull request #137 from martin2250/master

add --no-verify option, add XF86Sleep to --pass-power-keys
Diffstat:
Mi3lock.1 | 4++++
Mi3lock.c | 12++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/i3lock.1 b/i3lock.1
@@ -423,6 +423,10 @@ The value by which the bars decrease each time the screen is redrawn.
 .B \-\-bar\-position
 Works similarly to the time/date/indicator expressions. If the bar is horizontal, this sets the vertical offset from the top edge. If it's vertically oriented, this sets the horizontal offset from the left edge.
 
+.TP
+.B \-\-no\-verify
+Do not verify the password entered by the user and unlock immediately. Use only for quickly testing new configurations and remember to remove to actually lock your screen!
+
 
 
 .SH DPMS
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;
@@ -500,6 +503,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;
 
@@ -1473,6 +1481,7 @@ int main(int argc, char *argv[]) {
         {"redraw-thread", no_argument, NULL, 900},
         {"refresh-rate", required_argument, NULL, 901},
         {"composite", no_argument, NULL, 902},
+        {"no-verify", no_argument, NULL, 905},
 
         // slideshow options
         {"slideshow-interval", required_argument, NULL, 903},
@@ -2013,6 +2022,9 @@ int main(int argc, char *argv[]) {
             case 904:
                 slideshow_random_selection = true;
                 break;
+            case 905:
+                no_verify = true;
+                break;
             case 998:
                 image_raw_format = strdup(optarg);
                 break;