last commit can now be done with an argument
This commit is contained in:
parent
a2c28dbfdd
commit
b58eb6cb9f
|
@ -89,6 +89,12 @@ You may use long, descriptive arguments or the shorter arguments.
|
||||||
`-nci, --no-color-items`
|
`-nci, --no-color-items`
|
||||||
: Don't color items
|
: Don't color items
|
||||||
|
|
||||||
|
`-sgr, --sgr`
|
||||||
|
: Interpret SGR sequences
|
||||||
|
|
||||||
|
`-nsgr, --no-sgr`
|
||||||
|
: Display SGR sequences as text
|
||||||
|
|
||||||
`-a, --alpha`
|
`-a, --alpha`
|
||||||
: Enable alpha
|
: Enable alpha
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,10 @@ readargs(int argc, char *argv[])
|
||||||
coloritems = 1;
|
coloritems = 1;
|
||||||
} else if (!strcmp(argv[i], "-nci") || (!strcmp(argv[i], "--no-color-items"))) { // don't color items
|
} else if (!strcmp(argv[i], "-nci") || (!strcmp(argv[i], "--no-color-items"))) { // don't color items
|
||||||
coloritems = 0;
|
coloritems = 0;
|
||||||
|
} else if (!strcmp(argv[i], "-sgr") || (!strcmp(argv[i], "--sgr"))) { // enable sgr seq support
|
||||||
|
sgr = 1;
|
||||||
|
} else if (!strcmp(argv[i], "-nsgr") || (!strcmp(argv[i], "--no-sgr"))) { // disable sgr seq support
|
||||||
|
sgr = 0;
|
||||||
} else if (i + 1 == argc) {
|
} else if (i + 1 == argc) {
|
||||||
// any of the arguments we checked first
|
// any of the arguments we checked first
|
||||||
if ((!strcmp(argv[i], "-xrdb")
|
if ((!strcmp(argv[i], "-xrdb")
|
||||||
|
@ -426,6 +430,8 @@ usage(void)
|
||||||
"spmenu -nip, --no-indent Don't 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"
|
"spmenu -ci, --color-items Color items\n"
|
||||||
"spmenu -nci, --no-color-items Don't color items\n"
|
"spmenu -nci, --no-color-items Don't color items\n"
|
||||||
|
"spmenu -sgr, --sgr Interpret SGR sequences\n"
|
||||||
|
"spmenu -nsgr, --no-sgr Display SGR sequences as text\n"
|
||||||
"spmenu -a, --alpha Enable alpha\n"
|
"spmenu -a, --alpha Enable alpha\n"
|
||||||
"spmenu -na, --no-alpha Disable alpha\n"
|
"spmenu -na, --no-alpha Disable alpha\n"
|
||||||
"spmenu -tp, --allow-typing Allow the user to type\n"
|
"spmenu -tp, --allow-typing Allow the user to type\n"
|
||||||
|
|
6
spmenu.1
6
spmenu.1
|
@ -106,6 +106,12 @@ Color items
|
||||||
\f[V]-nci, --no-color-items\f[R]
|
\f[V]-nci, --no-color-items\f[R]
|
||||||
Don\[cq]t color items
|
Don\[cq]t color items
|
||||||
.TP
|
.TP
|
||||||
|
\f[V]-sgr, --sgr\f[R]
|
||||||
|
Interpret SGR sequences
|
||||||
|
.TP
|
||||||
|
\f[V]-nsgr, --no-sgr\f[R]
|
||||||
|
Display SGR sequences as text
|
||||||
|
.TP
|
||||||
\f[V]-a, --alpha\f[R]
|
\f[V]-a, --alpha\f[R]
|
||||||
Enable alpha
|
Enable alpha
|
||||||
.TP
|
.TP
|
||||||
|
|
Loading…
Reference in a new issue