.RB [\|\-p
.IR pointer\|]
.RB [\|\-u\|]
+.RB [\|\-e\|]
.SH DESCRIPTION
.B i3lock
displays a hardcoded Windows-Pointer (thus enabling you to fuck with your
friends by using a Screenshot of a Windows-Desktop as a locking-screen).
+.TP
+.B \-e, \-\-ignore-empty-password
+When an empty password is provided by the user, do not validate
+it. Without this option, the empty password will be provided to PAM
+and, if invalid, the user will have to wait a few seconds before
+another try. This can be useful if the XF86ScreenSaver key is used to
+put a laptop to sleep and bounce on resume or if you happen to wake up
+your computer with the enter key.
+
.SH SEE ALSO
.IR xautolock(1)
\- use i3lock as your screen saver
cairo_surface_t *img = NULL;
bool tile = false;
+bool ignore_empty_password = false;
/* isutf, u8_dec © 2005 Jeff Bezanson, public domain */
#define isutf(c) (((c) & 0xC0) != 0x80)
case XKB_KEY_Return:
case XKB_KEY_KP_Enter:
case XKB_KEY_XF86ScreenSaver:
+ if (ignore_empty_password && input_position == 0) {
+ clear_input();
+ return;
+ }
password[input_position] = '\0';
unlock_state = STATE_KEY_PRESSED;
redraw_screen();
{"no-unlock-indicator", no_argument, NULL, 'u'},
{"image", required_argument, NULL, 'i'},
{"tiling", no_argument, NULL, 't'},
+ {"ignore-empty-password", no_argument, NULL, 'e'},
{NULL, no_argument, NULL, 0}
};
if ((username = getenv("USER")) == NULL)
errx(1, "USER environment variable not set, please set it.\n");
- while ((o = getopt_long(argc, argv, "hvnbdc:p:ui:t", longopts, &optind)) != -1) {
+ while ((o = getopt_long(argc, argv, "hvnbdc:p:ui:te", longopts, &optind)) != -1) {
switch (o) {
case 'v':
errx(EXIT_SUCCESS, "version " VERSION " © 2010-2012 Michael Stapelberg");
errx(1, "i3lock: Invalid pointer type given. Expected one of \"win\" or \"default\".\n");
}
break;
+ case 'e':
+ ignore_empty_password = true;
+ break;
case 0:
if (strcmp(longopts[optind].name, "debug") == 0)
debug_mode = true;