From ec7a7684876c06764a583a1cefe2a93f6706e3ca Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 1 Apr 2020 19:59:47 +0200 Subject: conf: add 'title' conf option and --title command line option --- config.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config.c') 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); -- cgit v1.3