aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-04-01 17:59:47 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-04-01 17:59:47 +0000
commitec7a7684876c06764a583a1cefe2a93f6706e3ca (patch)
treea56aacfe68b35eadbf4025a5c366b36585fe7d82 /config.c
parentcompletions: zsh: repair -a,--app-id completions (diff)
conf: add 'title' conf option and --title command line option
Diffstat (limited to 'config.c')
-rw-r--r--config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/config.c b/config.c
index d73e8ec1..a97b8a38 100644
--- a/config.c
+++ b/config.c
@@ -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);