--- dmenu.c
|
|
+++ dmenu.c
|
|
@@ -637,7 +637,8 @@ static void
|
|
usage(void)
|
|
{
|
|
fputs("usage: dmenu [-bfiv] [-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]\n"
|
|
+ " [-it text]\n", stderr);
|
|
exit(1);
|
|
}
|
|
|
|
@@ -680,7 +681,10 @@ main(int argc, char *argv[])
|
|
colors[SchemeSel][ColFg] = argv[++i];
|
|
else if (!strcmp(argv[i], "-w")) /* embedding window id */
|
|
embed = argv[++i];
|
|
- else
|
|
+ else if (!strcmp(argv[i], "-it")) { /* embedding window id */
|
|
+ const char * text = argv[++i];
|
|
+ insert(text, strlen(text));
|
|
+ } else
|
|
usage();
|
|
|
|
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|