Spawning new terminal with --config from parent instance

Reference: https://codeberg.org/dnkl/foot/issues/1622
Signed-off-by: Stéphane Klein <contact@stephane-klein.info>
This commit is contained in:
Stéphane Klein 2026-01-09 00:31:04 +01:00
parent b78cc92322
commit 6d8027dd94
5 changed files with 21 additions and 1 deletions

View file

@ -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;
}