From a6d964a0057a3eec991ecc32c446bcc54073c214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Madrid=20Menc=C3=ADa?= Date: Thu, 2 May 2019 22:20:33 +0200 Subject: [PATCH] Add thumbs-key option --- README.md | 13 +++++++++++++ tmux-thumbs.tmux | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) 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"