aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-04-01 16:40:51 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-04-01 16:40:51 +0000
commit4d52a870b493c17172766db3d0a76cd8f0c3204c (patch)
treee0109cf0143deee112f3c8cf5c6a27c649b508f1 /config.c
parentdoc: foot.5: minor updates to 'tweaks' (diff)
conf: add app-id config option and --app-id 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 b33f5818..d73e8ec1 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, "app-id") == 0) {
+ free(conf->app_id);
+ conf->app_id = strdup(value);
+ }
+
else if (strcmp(key, "geometry") == 0) {
unsigned width, height;
if (sscanf(value, "%ux%u", &width, &height) != 2 || width == 0 || height == 0) {
@@ -827,6 +832,7 @@ config_load(struct config *conf, const char *conf_path)
*conf = (struct config) {
.term = strdup("foot"),
.shell = get_shell(),
+ .app_id = strdup("foot"),
.width = 700,
.height = 500,
.pad_x = 2,
@@ -960,6 +966,7 @@ config_free(struct config conf)
{
free(conf.term);
free(conf.shell);
+ free(conf.app_id);
tll_free_and_free(conf.fonts, free);
free(conf.server_socket_path);