config: add support for appending a 'spawn' argument to key bindings

A key binding may now have an optional ':<cmd>' string appended to the
key.

This is intended to be used like so:

  pipe-scrollback:sh -c "cat > file"=Print

TODO: we still only allow one *action*. Meaning you still cannot
specify multiple pipe-scrollback bindings, for example.
This commit is contained in:
Daniel Eklöf 2020-07-15 13:32:31 +02:00
parent f21ea97037
commit 57f5cc1bf2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 18 additions and 3 deletions

View file

@ -49,6 +49,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];
/*