mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-03-14 11:22:48 +01:00
Add a --list-layers option
To get a list of available layers for the -l option. Signed-off-by: Emmanuel LE TRONG <emmanuel.le-trong@cnrs-orleans.fr> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
7af52d695d
commit
acf38cf46e
15
main.c
15
main.c
@ -376,6 +376,17 @@ usage(char *argv0) {
|
||||
fprintf(stderr, " --swipe-sp [rrggbb|aa] - Set color of swiped special keys\n");
|
||||
fprintf(stderr, " --text [rrggbb|aa] - Set color of text on keys\n");
|
||||
fprintf(stderr, " --text-sp [rrggbb|aa] - Set color of text on special keys\n");
|
||||
fprintf(stderr, " --list-layers - Print the list of available layers\n");
|
||||
}
|
||||
|
||||
void
|
||||
list_layers() {
|
||||
int i;
|
||||
for (i = 0; i < NumLayouts - 1; i++) {
|
||||
if (layouts[i].name) {
|
||||
puts(layouts[i].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -567,6 +578,10 @@ main(int argc, char **argv) {
|
||||
} else if ((!strcmp(argv[i], "-hidden")) ||
|
||||
(!strcmp(argv[i], "--hidden"))) {
|
||||
hidden = true;
|
||||
} else if ((!strcmp(argv[i], "-list-layers")) ||
|
||||
(!strcmp(argv[i], "--list-layers"))) {
|
||||
list_layers();
|
||||
exit(0);
|
||||
} else {
|
||||
fprintf(stderr, "Invalid argument: %s\n", argv[i]);
|
||||
usage(argv[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user