server: implement a --server mode

In this mode, foot listens on a UNIX socket and creates terminal
windows when clients connect.

A connecting client sends argc/argv to the server, and the server
instantiates a new terminal window.

When the terminal window is closed, the exit code is sent back to the
client.
This commit is contained in:
Daniel Eklöf 2019-11-01 20:37:22 +01:00
parent 32c6ed7069
commit a1efd65746
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 334 additions and 2 deletions

9
server.h Normal file
View file

@ -0,0 +1,9 @@
#pragma once
#include "fdm.h"
#include "config.h"
#include "wayland.h"
struct server;
struct server *server_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl);
void server_destroy(struct server *server);