diff options
-rw-r--r-- | slock.1 | 24 | ||||
-rw-r--r-- | slock.c | 16 |
2 files changed, 9 insertions, 31 deletions
@@ -1,29 +1,19 @@ | |||
1 | .TH SLOCK 1 slock\-VERSION | 1 | .TH SLOCK 1 slock\-VERSION |
2 | .SH NAME | 2 | .SH NAME |
3 | slock \- simple X display locker | 3 | slock \- simple X screen locker |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
5 | .B slock | 5 | .B slock |
6 | .RB [ \-v | 6 | .RB [ |
7 | | | 7 | .IR cmd |
8 | .IR post_lock_command ] | 8 | ] |
9 | .SH DESCRIPTION | 9 | .SH DESCRIPTION |
10 | .B slock | 10 | .B slock |
11 | is a screen locker for X. If provided, the | 11 | is an X screen locker. If provided, |
12 | .IR post_lock_command | 12 | .IR cmd |
13 | will be executed when the screen is locked. | 13 | is executed after the screen has been locked. |
14 | .SH OPTIONS | ||
15 | .TP | ||
16 | .B \-v | ||
17 | prints version information to stdout, then exits. | ||
18 | .SH EXAMPLES | 14 | .SH EXAMPLES |
19 | $ slock /usr/sbin/s2ram | 15 | $ slock /usr/sbin/s2ram |
20 | .SH CUSTOMIZATION | 16 | .SH CUSTOMIZATION |
21 | .B slock | 17 | .B slock |
22 | can be customized by creating a custom config.h and (re)compiling the source | 18 | can be customized by creating a custom config.h and (re)compiling the source |
23 | code. This keeps it fast, secure and simple. | 19 | code. This keeps it fast, secure and simple. |
24 | .SH AUTHORS | ||
25 | See the LICENSE file for the authors. | ||
26 | .SH LICENSE | ||
27 | See the LICENSE file for the terms of redistribution. | ||
28 | .SH BUGS | ||
29 | Please report them. | ||
@@ -272,27 +272,15 @@ lockscreen(Display *dpy, int screen) | |||
272 | return NULL; | 272 | return NULL; |
273 | } | 273 | } |
274 | 274 | ||
275 | static void | ||
276 | usage(void) | ||
277 | { | ||
278 | fprintf(stderr, "usage: slock [-v|POST_LOCK_CMD]\n"); | ||
279 | exit(1); | ||
280 | } | ||
281 | |||
282 | int | 275 | int |
283 | main(int argc, char **argv) { | 276 | main(int argc, char **argv) |
277 | { | ||
284 | #ifndef HAVE_BSD_AUTH | 278 | #ifndef HAVE_BSD_AUTH |
285 | const char *pws; | 279 | const char *pws; |
286 | #endif | 280 | #endif |
287 | Display *dpy; | 281 | Display *dpy; |
288 | int screen; | 282 | int screen; |
289 | 283 | ||
290 | if ((argc == 2) && !strcmp("-v", argv[1])) | ||
291 | die("slock-%s, © 2006-2016 slock engineers\n", VERSION); | ||
292 | |||
293 | if ((argc == 2) && !strcmp("-h", argv[1])) | ||
294 | usage(); | ||
295 | |||
296 | #ifdef __linux__ | 284 | #ifdef __linux__ |
297 | dontkillme(); | 285 | dontkillme(); |
298 | #endif | 286 | #endif |