diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-02-08 17:57:17 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-08 17:57:17 +0000 |
| commit | 79e054faff0d6d49d44ef0c1c052387eb66581d0 (patch) | |
| tree | 8bcd3684097661804bd41d4aca4df5c268c4e1fc /config.h | |
| parent | Merge branch 'url-parser-recognize-percent' (diff) | |
| parent | key-bindings: refactor: use a single type for all key bindings (diff) | |
Merge branch 'refactor-key-bindings'
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 37 |
1 files changed, 12 insertions, 25 deletions
@@ -25,39 +25,26 @@ struct config_key_modifiers { bool meta; }; -struct config_key_binding_normal { - enum bind_action_normal action; - struct config_key_modifiers modifiers; - xkb_keysym_t sym; - struct { - char *cmd; - char **argv; - bool master_copy; - } pipe; -}; - -struct config_key_binding_search { - enum bind_action_search action; - struct config_key_modifiers modifiers; - xkb_keysym_t sym; +struct config_binding_pipe { + char *cmd; + char **argv; + bool master_copy; }; -struct config_key_binding_url { - enum bind_action_url action; +struct config_key_binding { + int action; /* One of the varios bind_action_* enums from wayland.h */ struct config_key_modifiers modifiers; xkb_keysym_t sym; + struct config_binding_pipe pipe; }; +typedef tll(struct config_key_binding) config_key_binding_list_t; struct config_mouse_binding { enum bind_action_normal action; struct config_key_modifiers modifiers; int button; int count; - struct { - char *cmd; - char **argv; - bool master_copy; - } pipe; + struct config_binding_pipe pipe; }; /* If px != 0 then px is valid, otherwise pt is valid */ @@ -169,7 +156,7 @@ struct config { struct { /* Bindings for "normal" mode */ - tll(struct config_key_binding_normal) key; + config_key_binding_list_t key; tll(struct config_mouse_binding) mouse; /* @@ -178,10 +165,10 @@ struct config { /* While searching (not - action to *start* a search is in the * 'key' bindings above */ - tll(struct config_key_binding_search) search; + config_key_binding_list_t search; /* While showing URL jump labels */ - tll(struct config_key_binding_url) url; + config_key_binding_list_t url; } bindings; struct { |
