slock

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e1a42edb2b515a6b322b37246f098a7c26958080
parent bb763ba9865e36eb3b655051a8b73f4301da299b
Author: bakkeby <bakkeby@gmail.com>
Date:   Sun,  4 Jan 2026 21:57:53 +0100

Visual unlock - adding command line argument to help output and correcting typo ref. #14

Diffstat:
Mpatches.def.h | 6+++---
Mslock.c | 14+++++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/patches.def.h b/patches.def.h @@ -139,9 +139,9 @@ */ #define UNLOCKSCREEN_PATCH 0 -/* This patch adds a command line argument -u that keeps the input locked but do not - * show the lock screen. The original patch simply combines the unlock screen patch and - * the DPMS patch. Enable DPMS_PATCH separately if you want DPMS. +/* This patch adds a -u command line argument that keeps input locked without showing the lock + * screen. The original patch simply combines the unlock screen patch and the DPMS patch. + * Enable DPMS_PATCH separately if you want DPMS. * https://tools.suckless.org/slock/patches/visual-unlock-dpms/ */ #define VISUAL_UNLOCK_PATCH 0 diff --git a/slock.c b/slock.c @@ -637,11 +637,15 @@ lockscreen(Display *dpy, struct xrandr *rr, int screen) static void usage(void) { - #if MESSAGE_PATCH || COLOR_MESSAGE_PATCH - die("usage: slock [-v] [-f] [-m message] [cmd [arg ...]]\n"); - #else - die("usage: slock [-v] [cmd [arg ...]]\n"); - #endif // MESSAGE_PATCH | COLOR_MESSAGE_PATCH + die("usage: slock [-v] " + #if VISUAL_UNLOCK_PATCH + "[-u] " + #endif + #if MESSAGE_PATCH || COLOR_MESSAGE_PATCH + "[-f] [-m message] " + #endif + "[cmd [arg ...]]\n" + ); } int