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.
This commit is contained in:
FRIGN 2016-08-23 10:55:34 +02:00 committed by Markus Teich
parent d8bec0f6fd
commit a9eddbd94f
2 changed files with 27 additions and 29 deletions

54
slock.1
View file

@ -1,29 +1,27 @@
.TH SLOCK 1 slock\-VERSION .Dd 2016-08-23
.SH NAME .Dt SLOCK 1
slock \- simple X screen locker .Sh NAME
.SH SYNOPSIS .Nm slock
.B slock .Nd simple X screen locker
.RB [ \-v .Sh SYNOPSIS
| .Nm
.IR cmd ] .Op Fl v
.SH DESCRIPTION .Op Ar cmd Op Ar arg ...
.B slock .Sh DESCRIPTION
is an X screen locker. If provided, .Nm
.IR cmd is a simple X screen locker. If provided,
.Ar cmd Op Ar arg ...
is executed after the screen has been locked. is executed after the screen has been locked.
.SH OPTIONS .Sh OPTIONS
.TP .Bl -tag -width Ds
.B \-v .It Fl v
prints version information to stdout, then exits. Print version information to stdout and exit.
.SH EXAMPLES .El
$ slock /usr/sbin/s2ram .Sh EXAMPLES
.SH CUSTOMIZATION $
.B slock .Nm
can be customized by creating a custom config.h and (re)compiling the source /usr/sbin/s2ram
code. This keeps it fast, secure and simple. .Sh CUSTOMIZATION
.SH AUTHORS .Nm
See the LICENSE file for the authors. can be customized by creating a custom config.h from config.def.h and
.SH LICENSE (re)compiling the source code. This keeps it fast, secure and simple.
See the LICENSE file for the terms of redistribution.
.SH BUGS
Please report them.

View file

@ -282,7 +282,7 @@ lockscreen(Display *dpy, int screen)
static void static void
usage(void) usage(void)
{ {
die("usage: slock [-v | cmd [arg ...]]\n"); die("usage: slock [-v] [cmd [arg ...]]\n");
} }
int int