mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
conf: bindings: allow several mappings for the same action
If the bindings has different pipe command associated with them, treat them as different actions.
This commit is contained in:
parent
062b0eb7ab
commit
1541531765
4 changed files with 166 additions and 87 deletions
20
config.h
20
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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue