Add thumbs-key option

This commit is contained in:
Miguel Madrid Mencía 2019-05-02 22:20:33 +02:00
parent b6d0a3d530
commit a6d964a005
No known key found for this signature in database
GPG Key ID: 4D0F6894D41C6957
2 changed files with 18 additions and 1 deletions

View File

@ -65,6 +65,7 @@ parameters to set your perfect profile.
NOTE: for changes to take effect, you'll need to source again your `.tmux.conf` file.
* [@thumbs-key](#thumbs-key)
* [@thumbs-alphabet](#thumbs-alphabet)
* [@thumbs-reverse](#thumbs-reverse)
* [@thumbs-unique](#thumbs-unique)
@ -78,6 +79,18 @@ NOTE: for changes to take effect, you'll need to source again your `.tmux.conf`
* [@thumbs-hint-fg-color](#thumbs-hint-fg-color)
* [@thumbs-select-fg-color](#thumbs-select-fg-color)
### @thumbs-key
`default: space`
Choose which key is used to enter in thumbs mode.
For example:
```
set -g @thumbs-key F
```
### @thumbs-alphabet
`default: qwerty`

View File

@ -2,4 +2,8 @@
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
tmux bind-key space run-shell "${CURRENT_DIR}/tmux-thumbs.sh"
DEFAULT_THUMBS_KEY="space"
THUMBS_KEY=$(tmux show-option -gqv @thumbs-key)
THUMBS_KEY=${THUMBS_KEY:-$DEFAULT_THUMBS_KEY}
tmux bind-key "$THUMBS_KEY" run-shell "${CURRENT_DIR}/tmux-thumbs.sh"