Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
989649b
)
prepared dmenu-1.8, shortened command line options (-font is -fn, -selbg is -sb,...
author
arg@mig29 <unknown>
Tue, 19 Dec 2006 10:39:07 +0000
(11:39 +0100)
committer
arg@mig29 <unknown>
Tue, 19 Dec 2006 10:39:07 +0000
(11:39 +0100)
dmenu.1
diff
|
blob
|
history
main.c
diff
|
blob
|
history
diff --git
a/dmenu.1
b/dmenu.1
index
5a3956d
..
9cc80a5
100644
(file)
--- a/
dmenu.1
+++ b/
dmenu.1
@@
-3,13
+3,13
@@
dmenu \- dynamic menu
.SH SYNOPSIS
.B dmenu
dmenu \- dynamic menu
.SH SYNOPSIS
.B dmenu
-.RB [ \-bottom ]
-.RB [ \-font " <name>"]
-.RB [ \-normbg " <color>"]
-.RB [ \-normfg " <color>"]
-.RB [ \-selbg " <color>"]
-.RB [ \-selfg " <color>"]
+.RB [ \-b ]
+.RB [ \-fn " <font>"]
+.RB [ \-nb " <color>"]
+.RB [ \-nf " <color>"]
.RB [ \-p " <prompt>"]
.RB [ \-p " <prompt>"]
+.RB [ \-sb " <color>"]
+.RB [ \-sf " <color>"]
.RB [ \-t " <seconds>"]
.RB [ \-v ]
.SH DESCRIPTION
.RB [ \-t " <seconds>"]
.RB [ \-v ]
.SH DESCRIPTION
@@
-20,27
+20,27
@@
It manages huge amounts (up to 10.000 and more) of user defined menu items
efficiently.
.SS Options
.TP
efficiently.
.SS Options
.TP
-.B \-b
ottom
+.B \-b
makes dmenu appear at the screen bottom (by default it appears at the screen top).
.TP
makes dmenu appear at the screen bottom (by default it appears at the screen top).
.TP
-.B \-font <
name
>
+.B \-font <
font
>
defines the font.
.TP
defines the font.
.TP
-.B \-n
ormbg
<color>
+.B \-n
b
<color>
defines the normal background color (#RGB, #RRGGBB, and color names are supported).
.TP
defines the normal background color (#RGB, #RRGGBB, and color names are supported).
.TP
-.B \-n
ormfg
<color>
+.B \-n
f
<color>
defines the normal foreground color (#RGB, #RRGGBB, and color names are supported).
.TP
defines the normal foreground color (#RGB, #RRGGBB, and color names are supported).
.TP
-.B \-selbg <color>
+.B \-p <prompt>
+defines a prompt to be displayed before the input area.
+.TP
+.B \-sb <color>
defines the selected background color (#RGB, #RRGGBB, and color names are supported).
.TP
defines the selected background color (#RGB, #RRGGBB, and color names are supported).
.TP
-.B \-s
elfg
<color>
+.B \-s
f
<color>
defines the selected foreground color (#RGB, #RRGGBB, and color names are supported).
.TP
defines the selected foreground color (#RGB, #RRGGBB, and color names are supported).
.TP
-.B \-p <prompt>
-defines a prompt to be displayed before the input area.
-.TP
.B \-t <seconds>
defines the seconds to wait for standard input, before exiting (default is 3).
.TP
.B \-t <seconds>
defines the seconds to wait for standard input, before exiting (default is 3).
.TP
diff --git
a/main.c
b/main.c
index
9ef0bae
..
69214dd
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-348,27
+348,27
@@
main(int argc, char *argv[]) {
timeout.tv_sec = 3;
/* command line args */
for(i = 1; i < argc; i++)
timeout.tv_sec = 3;
/* command line args */
for(i = 1; i < argc; i++)
- if(!strncmp(argv[i], "-b
ottom", 8
)) {
+ if(!strncmp(argv[i], "-b
", 3
)) {
bottom = True;
}
bottom = True;
}
- else if(!strncmp(argv[i], "-f
ont", 6
)) {
+ else if(!strncmp(argv[i], "-f
n", 4
)) {
if(++i < argc) font = argv[i];
}
if(++i < argc) font = argv[i];
}
- else if(!strncmp(argv[i], "-n
ormbg", 8
)) {
+ else if(!strncmp(argv[i], "-n
b", 4
)) {
if(++i < argc) normbg = argv[i];
}
if(++i < argc) normbg = argv[i];
}
- else if(!strncmp(argv[i], "-n
ormfg", 8
)) {
+ else if(!strncmp(argv[i], "-n
f", 4
)) {
if(++i < argc) normfg = argv[i];
}
if(++i < argc) normfg = argv[i];
}
- else if(!strncmp(argv[i], "-selbg", 7)) {
+ else if(!strncmp(argv[i], "-p", 3)) {
+ if(++i < argc) prompt = argv[i];
+ }
+ else if(!strncmp(argv[i], "-sb", 4)) {
if(++i < argc) selbg = argv[i];
}
if(++i < argc) selbg = argv[i];
}
- else if(!strncmp(argv[i], "-s
elfg", 7
)) {
+ else if(!strncmp(argv[i], "-s
f", 4
)) {
if(++i < argc) selfg = argv[i];
}
if(++i < argc) selfg = argv[i];
}
- else if(!strncmp(argv[i], "-p", 3)) {
- if(++i < argc) prompt = argv[i];
- }
else if(!strncmp(argv[i], "-t", 3)) {
if(++i < argc) timeout.tv_sec = atoi(argv[i]);
}
else if(!strncmp(argv[i], "-t", 3)) {
if(++i < argc) timeout.tv_sec = atoi(argv[i]);
}
@@
-377,8
+377,8
@@
main(int argc, char *argv[]) {
exit(EXIT_SUCCESS);
}
else
exit(EXIT_SUCCESS);
}
else
- eprint("usage: dmenu [-b
ottom] [-font <name>] [-{norm,sel}{bg,fg} <color
>]\n"
- " [-
p <prompt
>] [-t <seconds>] [-v]\n", stdout);
+ eprint("usage: dmenu [-b
] [-fn <font>] [-nb <color>] [-nf <color>] [-p <prompt
>]\n"
+ " [-
sb <color>] [-sf <color
>] [-t <seconds>] [-v]\n", stdout);
setlocale(LC_CTYPE, "");
dpy = XOpenDisplay(0);
if(!dpy)
setlocale(LC_CTYPE, "");
dpy = XOpenDisplay(0);
if(!dpy)