mirror of
https://codeberg.org/adnano/wmenu.git
synced 2025-11-05 13:29:53 -05:00
add center flag
This commit is contained in:
parent
0a38d45abb
commit
c417daa0a0
3 changed files with 28 additions and 8 deletions
9
menu.c
9
menu.c
|
|
@ -85,14 +85,17 @@ static bool parse_color(const char *color, uint32_t *result) {
|
|||
// Parse menu options from command line arguments.
|
||||
void menu_getopts(struct menu *menu, int argc, char *argv[]) {
|
||||
const char *usage =
|
||||
"Usage: wmenu [-biPv] [-f font] [-l lines] [-o output] [-p prompt]\n"
|
||||
"Usage: wmenu [-bciPv] [-f font] [-l lines] [-o output] [-p prompt]\n"
|
||||
"\t[-N color] [-n color] [-M color] [-m color] [-S color] [-s color]\n";
|
||||
|
||||
int opt;
|
||||
while ((opt = getopt(argc, argv, "bhiPvf:l:o:p:N:n:M:m:S:s:")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "bchiPvf:l:o:p:N:n:M:m:S:s:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'b':
|
||||
menu->bottom = true;
|
||||
menu->position = POSITION_BOTTOM;
|
||||
break;
|
||||
case 'c':
|
||||
menu->position = POSITION_CENTER;
|
||||
break;
|
||||
case 'i':
|
||||
menu->strncmp = strncasecmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue