From 082bfec89f47145444e6083f6aa3677fbcd1631f Mon Sep 17 00:00:00 2001 From: Nils Deppe Date: Tue, 18 Nov 2025 17:30:37 -0800 Subject: [PATCH] Add support for user-defined jump keys --- README.md | 5 +++++ scripts/tmux-jump.rb | 2 +- scripts/tmux-jump.sh | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1f0b2f..0c028d3 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,11 @@ set -g @jump-keys-position 'left' set -g @jump-keys-position 'off_left' ``` +And the keys: +``` +set -g @jump-keys 'aoeuidhtns' +``` + ## Similar Projects * [vimium](https://vimium.github.io/) diff --git a/scripts/tmux-jump.rb b/scripts/tmux-jump.rb index b78dcbe..834f76e 100755 --- a/scripts/tmux-jump.rb +++ b/scripts/tmux-jump.rb @@ -15,7 +15,7 @@ # CONFIG KEYS_POSITION = ENV['JUMP_KEYS_POSITION'] -KEYS = 'jfhgkdlsa'.each_char.to_a +KEYS = ENV['JUMP_KEYS'].each_char.to_a Config = Struct.new( :pane_nr, :pane_tty_file, diff --git a/scripts/tmux-jump.sh b/scripts/tmux-jump.sh index 57f140c..d5698ee 100755 --- a/scripts/tmux-jump.sh +++ b/scripts/tmux-jump.sh @@ -8,4 +8,5 @@ source $current_dir/utils.sh export JUMP_BACKGROUND_COLOR=$(get_tmux_option "@jump-bg-color" "\e[0m\e[32m") export JUMP_FOREGROUND_COLOR=$(get_tmux_option "@jump-fg-color" "\e[1m\e[31m") export JUMP_KEYS_POSITION=$(get_tmux_option "@jump-keys-position" "left") +export JUMP_KEYS=$(get_tmux_option "@jump-keys" "jfhgkdlsa") ruby "$current_dir/tmux-jump.rb" "$tmp_file"