slock

My build of slock (suckless display locker)
git clone https://git.regexghost.com/slock.git
Log | Files | Refs | README | LICENSE

commit 8b667e7527365041eaf1279ef8de95d2f816784d
parent 9d2532654f64b66bed50a059397f7f9f70956deb
Author: regexghost <dev@regexghost.com>
Date:   Mon,  1 Jun 2026 14:50:03 +0100

makefile update and no-xbell patch

Diffstat:
M.gitignore | 4++++
MMakefile | 4+++-
Mconfig.def.h | 3+++
Mslock.c | 3++-
4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,7 @@ *.o slock config.h +patches/ +*.diff +*.rej +*.orig diff --git a/Makefile b/Makefile @@ -6,6 +6,8 @@ include config.mk SRC = slock.c ${COMPATSRC} OBJ = ${SRC:.c=.o} +full: clean all + all: slock .c.o: @@ -20,7 +22,7 @@ slock: ${OBJ} ${CC} -o $@ ${OBJ} ${LDFLAGS} clean: - rm -f slock ${OBJ} slock-${VERSION}.tar.gz + rm -f config.h slock ${OBJ} slock-${VERSION}.tar.gz dist: clean mkdir -p slock-${VERSION} diff --git a/config.def.h b/config.def.h @@ -10,3 +10,6 @@ static const char *colorname[NUMCOLS] = { /* treat a cleared input like a wrong password (color) */ static const int failonclear = 1; + +/* enable or disable (1 means enable, 0 disable) bell sound when password is incorrect */ +static const int xbell = 0; diff --git a/slock.c b/slock.c @@ -166,7 +166,8 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, else running = !!strcmp(inputhash, hash); if (running) { - XBell(dpy, 100); + if (xbell == 1) + XBell(dpy, 100); failure = 1; } explicit_bzero(&passwd, sizeof(passwd));