mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: term_init: add 'cwd' argument
This is used when spawning the slave, to set its current working directory just before we exec() the client. In a regular foot instance, we set the cwd from getcwd(). In a foot server instance, each connecting client sends its cwd to the server, and we use that.
This commit is contained in:
parent
277735db65
commit
39146fac5c
6 changed files with 28 additions and 18 deletions
2
server.c
2
server.c
|
|
@ -220,7 +220,7 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
client->term = term_init(
|
||||
server->conf, server->fdm, server->wayl,
|
||||
strlen(term_env) > 0 ? term_env : server->conf->term,
|
||||
"footclient", argc, argv, &term_shutdown_handler, client);
|
||||
"footclient", cwd, argc, argv, &term_shutdown_handler, client);
|
||||
|
||||
if (client->term == NULL) {
|
||||
LOG_ERR("failed to instantiate new terminal");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue