aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-08 18:35:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-09 16:51:05 +0000
commite5c5cd54788076973f08f6aadf0d2b2f954a0423 (patch)
treee8af28ce95bf2ffee4f8f00ec08b253f45b82d84 /config.h
parentconfig: rename enum config_key_binding_type -> key_binding_type (diff)
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.
Diffstat (limited to 'config.h')
-rw-r--r--config.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/config.h b/config.h
index 473cfdd4..927f4e5f 100644
--- a/config.h
+++ b/config.h
@@ -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;