From: FRIGN Date: Tue, 23 Aug 2016 08:55:34 +0000 (+0200) Subject: Convert manpage to mandoc and fix usage X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=a9eddbd94fb03a36186ef2b1e784468dfcddbc19;p=slock.git Convert manpage to mandoc and fix usage In all honor, the previous usage was formally more correct, but for the sake of consistency across all the tools having the v-flag, I separated it from the command-string. Also, make use of the mandoc macros for the manpage. This makes it easier to maintain, extend and change in the future. --- diff --git a/slock.1 b/slock.1 index 0ef3e15..2b2b7c8 100644 --- a/slock.1 +++ b/slock.1 @@ -1,29 +1,27 @@ -.TH SLOCK 1 slock\-VERSION -.SH NAME -slock \- simple X screen locker -.SH SYNOPSIS -.B slock -.RB [ \-v -| -.IR cmd ] -.SH DESCRIPTION -.B slock -is an X screen locker. If provided, -.IR cmd +.Dd 2016-08-23 +.Dt SLOCK 1 +.Sh NAME +.Nm slock +.Nd simple X screen locker +.Sh SYNOPSIS +.Nm +.Op Fl v +.Op Ar cmd Op Ar arg ... +.Sh DESCRIPTION +.Nm +is a simple X screen locker. If provided, +.Ar cmd Op Ar arg ... is executed after the screen has been locked. -.SH OPTIONS -.TP -.B \-v -prints version information to stdout, then exits. -.SH EXAMPLES -$ slock /usr/sbin/s2ram -.SH CUSTOMIZATION -.B slock -can be customized by creating a custom config.h and (re)compiling the source -code. This keeps it fast, secure and simple. -.SH AUTHORS -See the LICENSE file for the authors. -.SH LICENSE -See the LICENSE file for the terms of redistribution. -.SH BUGS -Please report them. +.Sh OPTIONS +.Bl -tag -width Ds +.It Fl v +Print version information to stdout and exit. +.El +.Sh EXAMPLES +$ +.Nm +/usr/sbin/s2ram +.Sh CUSTOMIZATION +.Nm +can be customized by creating a custom config.h from config.def.h and +(re)compiling the source code. This keeps it fast, secure and simple. diff --git a/slock.c b/slock.c index 8ed59ca..3e2ab8f 100644 --- a/slock.c +++ b/slock.c @@ -282,7 +282,7 @@ lockscreen(Display *dpy, int screen) static void usage(void) { - die("usage: slock [-v | cmd [arg ...]]\n"); + die("usage: slock [-v] [cmd [arg ...]]\n"); } int