From 7e36027237cc2633bd48fd1808ad97396c82f2ef Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 18 Jul 2019 14:29:40 +0200 Subject: conf: TERM can now be set in footrc --- config.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index c433ad02..6d234264 100644 --- a/config.c +++ b/config.c @@ -85,9 +85,9 @@ static bool parse_section_main(const char *key, const char *value, struct config *conf, const char *path, unsigned lineno) { - if (strcmp(key, "font") == 0) { - free(conf->font); - conf->font = strdup(value); + if (strcmp(key, "term") == 0) { + free(conf->term); + conf->term = strdup(value); } else if (strcmp(key, "shell") == 0) { @@ -95,6 +95,11 @@ parse_section_main(const char *key, const char *value, struct config *conf, conf->shell = strdup(value); } + else if (strcmp(key, "font") == 0) { + free(conf->font); + conf->font = strdup(value); + } + else { LOG_WARN("%s:%u: invalid key: %s", path, lineno, key); return false; @@ -211,6 +216,7 @@ config_load(struct config *conf) bool ret = false; *conf = (struct config) { + .term = strdup("foot"), .shell = get_shell(), .font = strdup("monospace"), }; -- cgit v1.3