config: ‘pipe’ is now optional ‘aux’ data in the key-binding struct

This allows us to add helper functions that e.g. compare bindings’ aux
data in a generic way.
This commit is contained in:
Daniel Eklöf 2022-02-08 19:35:41 +01:00
parent 9814d96206
commit e5c5cd5478
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 116 additions and 83 deletions

View file

@ -44,9 +44,18 @@ struct argv {
char **args;
};
struct config_binding_pipe {
struct argv argv;
enum binding_aux_type {
BINDING_AUX_NONE,
BINDING_AUX_PIPE,
};
struct binding_aux {
enum binding_aux_type type;
bool master_copy;
union {
struct argv pipe;
};
};
enum key_binding_type {
@ -70,7 +79,7 @@ struct config_key_binding {
} m;
};
struct config_binding_pipe pipe;
struct binding_aux aux;
/* For error messages in collision handling */
const char *path;