summaryrefslogtreecommitdiff
path: root/slock/patches/slock-noxbell-0.2.diff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-09 03:10:22 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-09 03:10:22 +0900
commit36f7b343c714566d5bf931e768f0536a12d67c2f (patch)
tree2040321e9984b1d8191f144f6b81f05f38acb8d7 /slock/patches/slock-noxbell-0.2.diff
parent365403254a39ceac9797e430d4a62ec6c7b2f99c (diff)
updates
Diffstat (limited to 'slock/patches/slock-noxbell-0.2.diff')
-rw-r--r--slock/patches/slock-noxbell-0.2.diff37
1 files changed, 37 insertions, 0 deletions
diff --git a/slock/patches/slock-noxbell-0.2.diff b/slock/patches/slock-noxbell-0.2.diff
new file mode 100644
index 0000000..5a189e4
--- /dev/null
+++ b/slock/patches/slock-noxbell-0.2.diff
@@ -0,0 +1,37 @@
+From f8bd65f192bc09fddcbc3d5a61f4dd2bba283adf Mon Sep 17 00:00:00 2001
+From: John Doe <bankai671@proton.me>
+Date: Mon, 19 Feb 2024 22:01:05 +0100
+Subject: [PATCH] add bell sound configuration
+
+---
+ config.h | 3 +++
+ slock.c | 3 ++-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/config.def.h b/config.def.h
+index 9855e21..b32a2cf 100644
+--- 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
+index 5ae738c..f40ea23 100644
+--- a/slock.c
++++ b/slock.c
+@@ -165,7 +165,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));
+--
+2.43.0