aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-15 14:39:07 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-15 14:43:11 +0000
commit1541531765f517067dcb92b4870d64e1be9bd230 (patch)
tree43a453157fdef7ed8f8787d4f8457c7914b7938b /config.h
parentinput: wip: initial support for piping scrollback/view to external tools (diff)
conf: bindings: allow several mappings for the same action
If the bindings has different pipe command associated with them, treat them as different actions.
Diffstat (limited to 'config.h')
-rw-r--r--config.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/config.h b/config.h
index 06ee197c..2b43b806 100644
--- a/config.h
+++ b/config.h
@@ -6,6 +6,7 @@
#include <tllist.h>
#include "terminal.h"
+#include "wayland.h"
struct config_font {
char *pattern;
@@ -13,6 +14,17 @@ struct config_font {
int px_size;
};
+struct config_key_binding_normal {
+ enum bind_action_normal action;
+ char *key;
+ char *pipe_cmd;
+};
+
+struct config_key_binding_search {
+ enum bind_action_search action;
+ char *key;
+};
+
struct config {
char *term;
char *shell;
@@ -48,10 +60,8 @@ struct config {
struct {
/* Bindings for "normal" mode */
- char *key[BIND_ACTION_COUNT];
- char *spawn[BIND_ACTION_COUNT];
-
- struct mouse_binding mouse[BIND_ACTION_COUNT];
+ tll(struct config_key_binding_normal) key;
+ tll(struct mouse_binding) mouse;
/*
* Special modes
@@ -59,7 +69,7 @@ struct config {
/* While searching (not - action to *start* a search is in the
* 'key' bindings above */
- char *search[BIND_ACTION_SEARCH_COUNT];
+ tll(struct config_key_binding_search) search;
} bindings;
struct {