aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.130
-rw-r--r--main.c22
2 files changed, 26 insertions, 26 deletions
diff --git a/dmenu.1 b/dmenu.1
index 5a3956d..9cc80a5 100644
--- a/dmenu.1
+++ b/dmenu.1
@@ -3,13 +3,13 @@
3dmenu \- dynamic menu 3dmenu \- 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
20efficiently. 20efficiently.
21.SS Options 21.SS Options
22.TP 22.TP
23.B \-bottom 23.B \-b
24makes dmenu appear at the screen bottom (by default it appears at the screen top). 24makes 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>
27defines the font. 27defines the font.
28.TP 28.TP
29.B \-normbg <color> 29.B \-nb <color>
30defines the normal background color (#RGB, #RRGGBB, and color names are supported). 30defines the normal background color (#RGB, #RRGGBB, and color names are supported).
31.TP 31.TP
32.B \-normfg <color> 32.B \-nf <color>
33defines the normal foreground color (#RGB, #RRGGBB, and color names are supported). 33defines the normal foreground color (#RGB, #RRGGBB, and color names are supported).
34.TP 34.TP
35.B \-selbg <color> 35.B \-p <prompt>
36defines a prompt to be displayed before the input area.
37.TP
38.B \-sb <color>
36defines the selected background color (#RGB, #RRGGBB, and color names are supported). 39defines the selected background color (#RGB, #RRGGBB, and color names are supported).
37.TP 40.TP
38.B \-selfg <color> 41.B \-sf <color>
39defines the selected foreground color (#RGB, #RRGGBB, and color names are supported). 42defines the selected foreground color (#RGB, #RRGGBB, and color names are supported).
40.TP 43.TP
41.B \-p <prompt>
42defines a prompt to be displayed before the input area.
43.TP
44.B \-t <seconds> 44.B \-t <seconds>
45defines the seconds to wait for standard input, before exiting (default is 3). 45defines the seconds to wait for standard input, before exiting (default is 3).
46.TP 46.TP
diff --git a/main.c b/main.c
index 9ef0bae..69214dd 100644
--- a/main.c
+++ b/main.c
@@ -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)