summaryrefslogtreecommitdiff
path: root/src/til_args.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-13 21:36:00 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-13 21:47:56 -0700
commit1446525ac78b25932db12e4e690184b137fc6aa8 (patch)
tree46434c9363d4acf7610abaa7f863f660ecaa35b4 /src/til_args.c
parent2f4011b4c5ec416d78d6da304315708a42e39798 (diff)
til_args,*_fb: introduce --title= and wire up to til_fb_t
For meta-demo use cases like alphazed is experimenting with, it's desirable to change the window title from "rototiller" to "alphazed" or whatever if in windowed mode. This adds a way to do that in the obvious fashion... --title="alphazed" etc.
Diffstat (limited to 'src/til_args.c')
-rw-r--r--src/til_args.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/til_args.c b/src/til_args.c
index 7e4c7e6..b51f81b 100644
--- a/src/til_args.c
+++ b/src/til_args.c
@@ -60,6 +60,8 @@ static int args_parse(int argc, const char *argv[], til_args_t *res_args, int *r
res_args->print_module_contexts = 1;
} else if (!strcasecmp("--print-pipes", argv[i])) {
res_args->print_pipes = 1;
+ } else if (!strncasecmp("--title=", argv[i], 8)) {
+ res_args->title = &argv[i][8];
} else {
if (!res_argv)
return -EINVAL;
@@ -97,6 +99,7 @@ int til_args_help(FILE *out)
" --print-module-contexts print active contexts on-stream to stdout\n"
" --print-pipes print active pipes on-stream to stdout\n"
" --seed= seed to use for all PRNG in hexadecimal (e.g. 0xdeadbeef)\n"
+ " --title= title to use where applicable (e.g. window title)\n"
" --video= video settings\n"
);
}
© All Rights Reserved