From dc0c8550c38ffd0983789573a1a0d4417016c2c7 Mon Sep 17 00:00:00 2001 From: Stéphane Klein Date: Fri, 9 Jan 2026 00:31:04 +0100 Subject: Spawning new terminal with --config from parent instance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reference: https://codeberg.org/dnkl/foot/issues/1622 Signed-off-by: Stéphane Klein --- terminal.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index b670d606..8ce9bd4b 100644 --- a/terminal.c +++ b/terminal.c @@ -3802,8 +3802,18 @@ term_bell(struct terminal *term) bool term_spawn_new(const struct terminal *term) { + char *argv[4]; + int argc = 0; + + argv[argc++] = term->foot_exe; + if (term->conf->conf_path != NULL) { + argv[argc++] = "--config"; + argv[argc++] = term->conf->conf_path; + } + argv[argc] = NULL; + return spawn( - term->reaper, term->cwd, (char *const []){term->foot_exe, NULL}, + term->reaper, term->cwd, argv, -1, -1, -1, NULL, NULL, NULL) >= 0; } -- cgit v1.3