Merge pull request #7 from mimadrid/add_thumbs-key

Add thumbs-key option
This commit is contained in:
Ferran Basora 2019-05-03 00:11:33 +02:00 committed by GitHub
commit 3f1c9aa7d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"