[wiki] [sites] Update patch name and add new version of patch with configuration option || John Doe

From: <git_AT_suckless.org>
Date: Wed, 21 Feb 2024 23:37:07 +0100

commit 67a785e8fd1d1d0221eee69da625f0ef26e09df2
Author: John Doe <bankai671_AT_proton.me>
Date: Wed Feb 21 23:36:59 2024 +0100

    Update patch name and add new version of patch with configuration option

diff --git a/tools.suckless.org/slock/patches/noxbell/index.md b/tools.suckless.org/slock/patches/noxbell/index.md
index 9933b0c0..23468557 100644
--- a/tools.suckless.org/slock/patches/noxbell/index.md
+++ b/tools.suckless.org/slock/patches/noxbell/index.md
_AT_@ -4,9 +4,10 @@ This patch disables the bell that sounds when you make an incorrect password att
 
 Download
 --------
-* [slock-noxbell.0.1.diff](slock-noxbell.0.1.diff)
+* [slock-noxbell-0.1.diff](slock-noxbell-0.1.diff)
+* [slock-noxbell-0.2.diff](slock-noxbell-0.2.diff)
 
 Authors / Contributors
 -------
 * John Doe - <https://github.com/bankai671>
-* Eric Spero - <eric_AT_ericspero.com>
\ No newline at end of file
+* Eric Spero - <eric_AT_ericspero.com>
diff --git a/tools.suckless.org/slock/patches/noxbell/slock-noxbell.0.1.diff b/tools.suckless.org/slock/patches/noxbell/slock-noxbell-0.1.diff
similarity index 100%
rename from tools.suckless.org/slock/patches/noxbell/slock-noxbell.0.1.diff
rename to tools.suckless.org/slock/patches/noxbell/slock-noxbell-0.1.diff
diff --git a/tools.suckless.org/slock/patches/noxbell/slock-noxbell-0.2.diff b/tools.suckless.org/slock/patches/noxbell/slock-noxbell-0.2.diff
new file mode 100644
index 00000000..d2c10d4f
--- /dev/null
+++ b/tools.suckless.org/slock/patches/noxbell/slock-noxbell-0.2.diff
_AT_@ -0,0 +1,38 @@
+From f8bd65f192bc09fddcbc3d5a61f4dd2bba283adf Mon Sep 17 00:00:00 2001
+From: John Doe <bankai671_AT_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.h b/config.h
+index 9855e21..b32a2cf 100644
+--- a/config.h
++++ b/config.h
+_AT_@ -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
+_AT_@ -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
+
Received on Wed Feb 21 2024 - 23:37:07 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 21 2024 - 23:48:50 CET