prepared dmenu-1.8, shortened command line options (-font is -fn, -selbg is -sb, -selfg is -sf, -normbg is -nb, -normfg is -nf now)
0e96ae6f
2 file(s) · +26 −26
| 3 | 3 | dmenu \- dynamic menu |
|
| 4 | 4 | .SH SYNOPSIS |
|
| 5 | 5 | .B dmenu |
|
| 6 | - | .RB [ \-bottom ] |
|
| 7 | - | .RB [ \-font " <name>"] |
|
| 8 | - | .RB [ \-normbg " <color>"] |
|
| 9 | - | .RB [ \-normfg " <color>"] |
|
| 10 | - | .RB [ \-selbg " <color>"] |
|
| 11 | - | .RB [ \-selfg " <color>"] |
|
| 6 | + | .RB [ \-b ] |
|
| 7 | + | .RB [ \-fn " <font>"] |
|
| 8 | + | .RB [ \-nb " <color>"] |
|
| 9 | + | .RB [ \-nf " <color>"] |
|
| 12 | 10 | .RB [ \-p " <prompt>"] |
|
| 11 | + | .RB [ \-sb " <color>"] |
|
| 12 | + | .RB [ \-sf " <color>"] |
|
| 13 | 13 | .RB [ \-t " <seconds>"] |
|
| 14 | 14 | .RB [ \-v ] |
|
| 15 | 15 | .SH DESCRIPTION |
|
| 20 | 20 | efficiently. |
|
| 21 | 21 | .SS Options |
|
| 22 | 22 | .TP |
|
| 23 | - | .B \-bottom |
|
| 23 | + | .B \-b |
|
| 24 | 24 | makes dmenu appear at the screen bottom (by default it appears at the screen top). |
|
| 25 | 25 | .TP |
|
| 26 | - | .B \-font <name> |
|
| 26 | + | .B \-font <font> |
|
| 27 | 27 | defines the font. |
|
| 28 | 28 | .TP |
|
| 29 | - | .B \-normbg <color> |
|
| 29 | + | .B \-nb <color> |
|
| 30 | 30 | defines the normal background color (#RGB, #RRGGBB, and color names are supported). |
|
| 31 | 31 | .TP |
|
| 32 | - | .B \-normfg <color> |
|
| 32 | + | .B \-nf <color> |
|
| 33 | 33 | defines the normal foreground color (#RGB, #RRGGBB, and color names are supported). |
|
| 34 | 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 | 39 | defines the selected background color (#RGB, #RRGGBB, and color names are supported). |
|
| 37 | 40 | .TP |
|
| 38 | - | .B \-selfg <color> |
|
| 41 | + | .B \-sf <color> |
|
| 39 | 42 | defines the selected foreground color (#RGB, #RRGGBB, and color names are supported). |
|
| 40 | - | .TP |
|
| 41 | - | .B \-p <prompt> |
|
| 42 | - | defines a prompt to be displayed before the input area. |
|
| 43 | 43 | .TP |
|
| 44 | 44 | .B \-t <seconds> |
|
| 45 | 45 | defines the seconds to wait for standard input, before exiting (default is 3). |
|
| 348 | 348 | timeout.tv_sec = 3; |
|
| 349 | 349 | /* command line args */ |
|
| 350 | 350 | for(i = 1; i < argc; i++) |
|
| 351 | - | if(!strncmp(argv[i], "-bottom", 8)) { |
|
| 351 | + | if(!strncmp(argv[i], "-b", 3)) { |
|
| 352 | 352 | bottom = True; |
|
| 353 | 353 | } |
|
| 354 | - | else if(!strncmp(argv[i], "-font", 6)) { |
|
| 354 | + | else if(!strncmp(argv[i], "-fn", 4)) { |
|
| 355 | 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 | 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 | 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 | 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 | 370 | if(++i < argc) selfg = argv[i]; |
|
| 368 | - | } |
|
| 369 | - | else if(!strncmp(argv[i], "-p", 3)) { |
|
| 370 | - | if(++i < argc) prompt = argv[i]; |
|
| 371 | 371 | } |
|
| 372 | 372 | else if(!strncmp(argv[i], "-t", 3)) { |
|
| 373 | 373 | if(++i < argc) timeout.tv_sec = atoi(argv[i]); |
|
| 377 | 377 | exit(EXIT_SUCCESS); |
|
| 378 | 378 | } |
|
| 379 | 379 | else |
|
| 380 | - | eprint("usage: dmenu [-bottom] [-font <name>] [-{norm,sel}{bg,fg} <color>]\n" |
|
| 381 | - | " [-p <prompt>] [-t <seconds>] [-v]\n", stdout); |
|
| 380 | + | eprint("usage: dmenu [-b] [-fn <font>] [-nb <color>] [-nf <color>] [-p <prompt>]\n" |
|
| 381 | + | " [-sb <color>] [-sf <color>] [-t <seconds>] [-v]\n", stdout); |
|
| 382 | 382 | setlocale(LC_CTYPE, ""); |
|
| 383 | 383 | dpy = XOpenDisplay(0); |
|
| 384 | 384 | if(!dpy) |
|