diff options
-rw-r--r-- | dmenu.1 | 30 | ||||
-rw-r--r-- | main.c | 22 |
2 files changed, 26 insertions, 26 deletions
@@ -3,13 +3,13 @@ | |||
3 | dmenu \- dynamic menu | 3 | dmenu \- dynamic menu |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
5 | .B dmenu | 5 | .B dmenu |
6 | .RB [ \-bottom ] | 6 | .RB [ \-b ] |
7 | .RB [ \-font " <name>"] | 7 | .RB [ \-fn " <font>"] |
8 | .RB [ \-normbg " <color>"] | 8 | .RB [ \-nb " <color>"] |
9 | .RB [ \-normfg " <color>"] | 9 | .RB [ \-nf " <color>"] |
10 | .RB [ \-selbg " <color>"] | ||
11 | .RB [ \-selfg " <color>"] | ||
12 | .RB [ \-p " <prompt>"] | 10 | .RB [ \-p " <prompt>"] |
11 | .RB [ \-sb " <color>"] | ||
12 | .RB [ \-sf " <color>"] | ||
13 | .RB [ \-t " <seconds>"] | 13 | .RB [ \-t " <seconds>"] |
14 | .RB [ \-v ] | 14 | .RB [ \-v ] |
15 | .SH DESCRIPTION | 15 | .SH DESCRIPTION |
@@ -20,27 +20,27 @@ It manages huge amounts (up to 10.000 and more) of user defined menu items | |||
20 | efficiently. | 20 | efficiently. |
21 | .SS Options | 21 | .SS Options |
22 | .TP | 22 | .TP |
23 | .B \-bottom | 23 | .B \-b |
24 | makes dmenu appear at the screen bottom (by default it appears at the screen top). | 24 | makes dmenu appear at the screen bottom (by default it appears at the screen top). |
25 | .TP | 25 | .TP |
26 | .B \-font <name> | 26 | .B \-font <font> |
27 | defines the font. | 27 | defines the font. |
28 | .TP | 28 | .TP |
29 | .B \-normbg <color> | 29 | .B \-nb <color> |
30 | defines the normal background color (#RGB, #RRGGBB, and color names are supported). | 30 | defines the normal background color (#RGB, #RRGGBB, and color names are supported). |
31 | .TP | 31 | .TP |
32 | .B \-normfg <color> | 32 | .B \-nf <color> |
33 | defines the normal foreground color (#RGB, #RRGGBB, and color names are supported). | 33 | defines the normal foreground color (#RGB, #RRGGBB, and color names are supported). |
34 | .TP | 34 | .TP |
35 | .B \-selbg <color> | 35 | .B \-p <prompt> |
36 | defines a prompt to be displayed before the input area. | ||
37 | .TP | ||
38 | .B \-sb <color> | ||
36 | defines the selected background color (#RGB, #RRGGBB, and color names are supported). | 39 | defines the selected background color (#RGB, #RRGGBB, and color names are supported). |
37 | .TP | 40 | .TP |
38 | .B \-selfg <color> | 41 | .B \-sf <color> |
39 | defines the selected foreground color (#RGB, #RRGGBB, and color names are supported). | 42 | defines the selected foreground color (#RGB, #RRGGBB, and color names are supported). |
40 | .TP | 43 | .TP |
41 | .B \-p <prompt> | ||
42 | defines a prompt to be displayed before the input area. | ||
43 | .TP | ||
44 | .B \-t <seconds> | 44 | .B \-t <seconds> |
45 | defines the seconds to wait for standard input, before exiting (default is 3). | 45 | defines the seconds to wait for standard input, before exiting (default is 3). |
46 | .TP | 46 | .TP |
@@ -348,27 +348,27 @@ main(int argc, char *argv[]) { | |||
348 | timeout.tv_sec = 3; | 348 | timeout.tv_sec = 3; |
349 | /* command line args */ | 349 | /* command line args */ |
350 | for(i = 1; i < argc; i++) | 350 | for(i = 1; i < argc; i++) |
351 | if(!strncmp(argv[i], "-bottom", 8)) { | 351 | if(!strncmp(argv[i], "-b", 3)) { |
352 | bottom = True; | 352 | bottom = True; |
353 | } | 353 | } |
354 | else if(!strncmp(argv[i], "-font", 6)) { | 354 | else if(!strncmp(argv[i], "-fn", 4)) { |
355 | if(++i < argc) font = argv[i]; | 355 | if(++i < argc) font = argv[i]; |
356 | } | 356 | } |
357 | else if(!strncmp(argv[i], "-normbg", 8)) { | 357 | else if(!strncmp(argv[i], "-nb", 4)) { |
358 | if(++i < argc) normbg = argv[i]; | 358 | if(++i < argc) normbg = argv[i]; |
359 | } | 359 | } |
360 | else if(!strncmp(argv[i], "-normfg", 8)) { | 360 | else if(!strncmp(argv[i], "-nf", 4)) { |
361 | if(++i < argc) normfg = argv[i]; | 361 | if(++i < argc) normfg = argv[i]; |
362 | } | 362 | } |
363 | else if(!strncmp(argv[i], "-selbg", 7)) { | 363 | else if(!strncmp(argv[i], "-p", 3)) { |
364 | if(++i < argc) prompt = argv[i]; | ||
365 | } | ||
366 | else if(!strncmp(argv[i], "-sb", 4)) { | ||
364 | if(++i < argc) selbg = argv[i]; | 367 | if(++i < argc) selbg = argv[i]; |
365 | } | 368 | } |
366 | else if(!strncmp(argv[i], "-selfg", 7)) { | 369 | else if(!strncmp(argv[i], "-sf", 4)) { |
367 | if(++i < argc) selfg = argv[i]; | 370 | if(++i < argc) selfg = argv[i]; |
368 | } | 371 | } |
369 | else if(!strncmp(argv[i], "-p", 3)) { | ||
370 | if(++i < argc) prompt = argv[i]; | ||
371 | } | ||
372 | else if(!strncmp(argv[i], "-t", 3)) { | 372 | else if(!strncmp(argv[i], "-t", 3)) { |
373 | if(++i < argc) timeout.tv_sec = atoi(argv[i]); | 373 | if(++i < argc) timeout.tv_sec = atoi(argv[i]); |
374 | } | 374 | } |
@@ -377,8 +377,8 @@ main(int argc, char *argv[]) { | |||
377 | exit(EXIT_SUCCESS); | 377 | exit(EXIT_SUCCESS); |
378 | } | 378 | } |
379 | else | 379 | else |
380 | eprint("usage: dmenu [-bottom] [-font <name>] [-{norm,sel}{bg,fg} <color>]\n" | 380 | eprint("usage: dmenu [-b] [-fn <font>] [-nb <color>] [-nf <color>] [-p <prompt>]\n" |
381 | " [-p <prompt>] [-t <seconds>] [-v]\n", stdout); | 381 | " [-sb <color>] [-sf <color>] [-t <seconds>] [-v]\n", stdout); |
382 | setlocale(LC_CTYPE, ""); | 382 | setlocale(LC_CTYPE, ""); |
383 | dpy = XOpenDisplay(0); | 383 | dpy = XOpenDisplay(0); |
384 | if(!dpy) | 384 | if(!dpy) |