tmux-thumbs/tmux-thumbs.tmux
Suraj N. Kurapati 805a5ebe56 let user specify a prefix-less @thumbs-key binding
This change allows me to bind a prefix-less shortcut for @thumbs-key.
For example, I bind a prefix-less Alt+Shift+U instead of Prefix + Space:

    set -g @thumbs-key '-n M-U'
2020-05-10 13:25:18 +02:00

16 lines
405 B
Bash
Executable File

#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
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 -b "${CURRENT_DIR}/tmux-thumbs.sh"
BINARY="${CURRENT_DIR}/target/release/thumbs"
if [ ! -f "$BINARY" ]; then
cd "${CURRENT_DIR}" && cargo build --release
fi