diff --git a/README.md b/README.md index 0c02237..4abac18 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/tmux-thumbs.tmux b/tmux-thumbs.tmux index 7bb89c4..205572c 100755 --- a/tmux-thumbs.tmux +++ b/tmux-thumbs.tmux @@ -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"