From 04b786da55407f58e97f5896e1c6f2225db9cd1a Mon Sep 17 00:00:00 2001 From: Martin Pittermann Date: Thu, 3 Oct 2019 14:02:19 +0200 Subject: [PATCH] add --no-verify option --- i3lock.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/i3lock.c b/i3lock.c index dc3f961..28d873c 100644 --- 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.");