aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2016-08-23 10:55:34 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-08-31 01:04:11 +0200
commita9eddbd94fb03a36186ef2b1e784468dfcddbc19 (patch)
tree7630149dbb1fcb05246e89fcdc563362582d5d94
parentd8bec0f6fdc8a246d78cb488a0068954b46fcb29 (diff)
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.
-rw-r--r--slock.154
-rw-r--r--slock.c2
2 files changed, 27 insertions, 29 deletions
diff --git a/slock.1 b/slock.1
index 0ef3e15..2b2b7c8 100644
--- a/slock.1
+++ b/slock.1
@@ -1,29 +1,27 @@
1.TH SLOCK 1 slock\-VERSION 1.Dd 2016-08-23
2.SH NAME 2.Dt SLOCK 1
3slock \- simple X screen locker 3.Sh NAME
4.SH SYNOPSIS 4.Nm slock
5.B slock 5.Nd simple X screen locker
6.RB [ \-v 6.Sh SYNOPSIS
7| 7.Nm
8.IR cmd ] 8.Op Fl v
9.SH DESCRIPTION 9.Op Ar cmd Op Ar arg ...
10.B slock 10.Sh DESCRIPTION
11is an X screen locker. If provided, 11.Nm
12.IR cmd 12is a simple X screen locker. If provided,
13.Ar cmd Op Ar arg ...
13is executed after the screen has been locked. 14is executed after the screen has been locked.
14.SH OPTIONS 15.Sh OPTIONS
15.TP 16.Bl -tag -width Ds
16.B \-v 17.It Fl v
17prints version information to stdout, then exits. 18Print version information to stdout and exit.
18.SH EXAMPLES 19.El
19$ slock /usr/sbin/s2ram 20.Sh EXAMPLES
20.SH CUSTOMIZATION 21$
21.B slock 22.Nm
22can be customized by creating a custom config.h and (re)compiling the source 23/usr/sbin/s2ram
23code. This keeps it fast, secure and simple. 24.Sh CUSTOMIZATION
24.SH AUTHORS 25.Nm
25See the LICENSE file for the authors. 26can be customized by creating a custom config.h from config.def.h and
26.SH LICENSE 27(re)compiling the source code. This keeps it fast, secure and simple.
27See the LICENSE file for the terms of redistribution.
28.SH BUGS
29Please report them.
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)
282static void 282static void
283usage(void) 283usage(void)
284{ 284{
285 die("usage: slock [-v | cmd [arg ...]]\n"); 285 die("usage: slock [-v] [cmd [arg ...]]\n");
286} 286}
287 287
288int 288int