added initial text patch
This commit is contained in:
parent
f4dd6fa68d
commit
b2a36856e7
5
dmenu.1
5
dmenu.1
@ -22,6 +22,8 @@ dmenu \- dynamic menu
|
|||||||
.IR color ]
|
.IR color ]
|
||||||
.RB [ \-w
|
.RB [ \-w
|
||||||
.IR windowid ]
|
.IR windowid ]
|
||||||
|
.RB [ \-it
|
||||||
|
.IR text ]
|
||||||
.P
|
.P
|
||||||
.BR dmenu_run " ..."
|
.BR dmenu_run " ..."
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@ -83,6 +85,9 @@ prints version information to stdout, then exits.
|
|||||||
.TP
|
.TP
|
||||||
.BI \-w " windowid"
|
.BI \-w " windowid"
|
||||||
embed into windowid.
|
embed into windowid.
|
||||||
|
.TP
|
||||||
|
.BI \-it " text".
|
||||||
|
start with initial text input.
|
||||||
.SH USAGE
|
.SH USAGE
|
||||||
dmenu is completely controlled by the keyboard. Items are selected using the
|
dmenu is completely controlled by the keyboard. Items are selected using the
|
||||||
arrow keys, page up, page down, home, and end.
|
arrow keys, page up, page down, home, and end.
|
||||||
|
7
dmenu.c
7
dmenu.c
@ -697,7 +697,7 @@ static void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fputs("usage: dmenu [-bfinv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
|
fputs("usage: dmenu [-bfinv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
|
||||||
" [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
|
" [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid] [-it text]\n", stderr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,7 +742,10 @@ main(int argc, char *argv[])
|
|||||||
colors[SchemeSel][ColFg] = argv[++i];
|
colors[SchemeSel][ColFg] = argv[++i];
|
||||||
else if (!strcmp(argv[i], "-w")) /* embedding window id */
|
else if (!strcmp(argv[i], "-w")) /* embedding window id */
|
||||||
embed = argv[++i];
|
embed = argv[++i];
|
||||||
else
|
else if (!strcmp(argv[i], "-it")) { /* embedding window id */
|
||||||
|
const char * text = argv[++i];
|
||||||
|
insert(text, strlen(text));
|
||||||
|
} else
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||||
|
Loading…
Reference in New Issue
Block a user