conf: add 'title' conf option and --title command line option

This commit is contained in:
Daniel Eklöf 2020-04-01 19:59:47 +02:00
parent 57761fbd50
commit ec7a768487
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
12 changed files with 65 additions and 2 deletions

View file

@ -209,6 +209,11 @@ parse_section_main(const char *key, const char *value, struct config *conf,
conf->login_shell = str_to_bool(value);
}
else if (strcmp(key, "title") == 0) {
free(conf->title);
conf->title = strdup(value);
}
else if (strcmp(key, "app-id") == 0) {
free(conf->app_id);
conf->app_id = strdup(value);
@ -832,6 +837,7 @@ config_load(struct config *conf, const char *conf_path)
*conf = (struct config) {
.term = strdup("foot"),
.shell = get_shell(),
.title = strdup("foot"),
.app_id = strdup("foot"),
.width = 700,
.height = 500,
@ -966,6 +972,7 @@ config_free(struct config conf)
{
free(conf.term);
free(conf.shell);
free(conf.title);
free(conf.app_id);
tll_free_and_free(conf.fonts, free);
free(conf.server_socket_path);