finish the -It argument

This commit is contained in:
speedie 2023-04-03 15:14:20 +02:00
parent 4d1e640e89
commit 2c68937e38
3 changed files with 15 additions and 3 deletions

View file

@ -71,6 +71,9 @@ You may use long, descriptive arguments or the shorter arguments.
`-p, --prompt text`
: Set spmenu prompt text to text
`-It, --input text`
: Set initial input text to text
`-ip, --indent`
: Indent items to prompt width
@ -645,7 +648,8 @@ In addition to the aforementioned `spmenu_run`, the spmenu package also provides
Unlike the regular run launcher though, spmenu_desktop supports displaying an
icon for entries that use one.
It can be configured through editing `~/.config/spmenu/desktop/config`.
It can be configured through editing `~/.config/spmenu/desktop/config`. The
configuration file can also be moved by setting `${XDG_CONFIG_HOME}`.
spmenu commands
===============

View file

@ -214,6 +214,8 @@ readargs(int argc, char *argv[])
dmw = atoi(argv[++i]);
else if (!strcmp(argv[i], "-p") || (!strcmp(argv[i], "--prompt"))) // adds prompt to left of input field
prompt = argv[++i];
else if (!strcmp(argv[i], "-It") || (!strcmp(argv[i], "--input"))) // specify initial text
input = argv[++i];
else if (!strcmp(argv[i], "-fn") || (!strcmp(argv[i], "--font"))) // font or font set
fonts[0] = argv[++i];
else if (!strcmp(argv[i], "-nmt") || (!strcmp(argv[i], "--normal-mode-text"))) // normal mode text
@ -378,6 +380,7 @@ usage(void)
"spmenu -NF, --no-fuzzy Disable fuzzy matching\n"
"spmenu -P, --password Hide characters\n"
"spmenu -p, --prompt <text> Set spmenu prompt text to <text>\n"
"spmenu -It, --input <text> Set initial input text to <text>\n"
"spmenu -ip, --indent Indent items to prompt width\n"
"spmenu -nip, --no-indent Don't indent items to prompt width\n"
"spmenu -ci, --color-items Color items\n"

View file

@ -88,6 +88,9 @@ Hide characters
\f[V]-p, --prompt text\f[R]
Set spmenu prompt text to text
.TP
\f[V]-It, --input text\f[R]
Set initial input text to text
.TP
\f[V]-ip, --indent\f[R]
Indent items to prompt width
.TP
@ -689,6 +692,8 @@ displaying an icon for entries that use one.
.PP
It can be configured through editing
\f[V]\[ti]/.config/spmenu/desktop/config\f[R].
The configuration file can also be moved by setting
\f[V]${XDG_CONFIG_HOME}\f[R].
.SH spmenu commands
.PP
spmenu has a few special commands.