~kris/suckless

slock

e1a42edb2b515a6b322b37246f098a7c26958080 — bakkeby 8 months ago bb763ba
Visual unlock - adding command line argument to help output and correcting typo ref. #14
2 files changed, 12 insertions(+), 8 deletions(-)

M patches.def.h
M slock.c
M patches.def.h => patches.def.h +3 -3
@@ 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

M slock.c => slock.c +9 -5
@@ 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