slock

simple X display locker utility
git clone git://git.suckless.org/slock
Log | Files | Refs | README | LICENSE

commit bf0a5577acbd9ec7c6a577601b97144b205840d7
parent e3fb34364ed2c53b21edde07ac17560a601783a9
Author: Drew Marino <drewmarino25@gmail.com>
Date:   Fri, 15 Aug 2025 19:30:19 -0400

Support ^U for clearing password

^U is a fairly common key combo for clearing fields, this patch adds
support for it.

Diffstat:
Mslock.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/slock.c b/slock.c @@ -185,6 +185,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, (len + num < sizeof(passwd))) { memcpy(passwd + len, buf, num); len += num; + } else if (buf[0] == '\025') { + explicit_bzero(&passwd, sizeof(passwd)); + len = 0; } break; }