From 136d60606a1e01eb68ed984de63b7a55f8966075 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 23 Jun 2021 14:22:18 +0200 Subject: client: send overrides for everything that is publicly visible in the conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Send a generic “overrides” list to the server, containing options in text, on the format “section.key=value”. This reduces the size of the base client/server protocol packet, as well as opens up for a generic -o,--override command line option (not yet implemented). --- client-protocol.h | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'client-protocol.h') diff --git a/client-protocol.h b/client-protocol.h index 663199c9..c1291f28 100644 --- a/client-protocol.h +++ b/client-protocol.h @@ -4,32 +4,23 @@ #include #include -struct client_argv { +struct client_string { uint16_t len; - /* char arg[static len]; */ + /* char str[static len]; */ }; struct client_data { - unsigned width; - unsigned height; - uint8_t size_type:1; // Values correspond to enum conf_size_type - uint8_t maximized:1; - uint8_t fullscreen:1; - uint8_t hold:1; - uint8_t login_shell:1; - uint8_t no_wait:1; + bool hold:1; + bool no_wait:1; + uint8_t reserved:6; uint16_t cwd_len; - uint16_t term_len; - uint16_t title_len; - uint16_t app_id_len; - + uint16_t override_count; uint16_t argc; /* char cwd[static cwd_len]; */ - /* char term[static term_len]; */ - /* char title[static title_len]; */ - /* char app_id[static app_id_len]; */ + /* struct client_string overrides[static override_count]; */ + /* struct client_string argv[static argc]; */ +} __attribute__((packed)); - /* struct client_argv argv[static argc]; */ -}; +_Static_assert(sizeof(struct client_data) == 7, "protocol struct size error"); -- cgit v1.3