sainnhe/tmux-fzf

Tmux fzf cannot display

AlphaTechnolog opened this issue · 2 comments

I try press the keys C-Space (my prefix) + F (Shift+f) and tmux fzt cannot display.
this is my .tmux.conf:

# {{{Settings
# 启动non-login shell
set -g default-command "${SHELL}"
# 设置颜色
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# 鼠标支持
set -g mouse on
# 主题
source ~/.tmux/tmuxline/edge-dark.tmux.conf
# }}}
# {{{Mappings
prefix C-p
unbind C-a
set -g prefix C-Space
bind C-Space send-prefix

# reload config file
bind-key -T prefix r source-file ~/.tmux.conf

# window
bind-key -T prefix C-t new-window
bind-key -T prefix C-w unlink-window -k
bind-key -n C-left prev
bind-key -n C-right next
bind-key -n C-up swap-window -t -1
bind-key -n C-down swap-window -t +1
bind-key -T prefix C-s split-window
bind-key -T prefix C-v split-window -h

# pane
bind-key -T prefix C-h select-pane -L
bind-key -T prefix C-j select-pane -D
bind-key -T prefix C-k select-pane -U
bind-key -T prefix C-l select-pane -R
bind-key -T prefix C-x kill-pane

# copy mode
bind-key -T prefix n copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection

# custom
bind-key -T prefix C-b splitw -h -p 40 -b -c '#{pane_current_path}'
# }}}
# {{{Plugins
# {{{tpm-usage
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# 
# prefix I   install
# prefix alt-u   uninstall
# prefix U   upgrade
# }}}
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'sainnhe/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'toddyamakawa/tmux-scratchpad'
run -b '~/.tmux/plugins/tpm/tpm'
# {{{tmux-resurrect
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
set -g @resurrect-capture-pane-contents 'on'
# }}}
# {{{tmux-continuum
set -g @continuum-restore 'on'
set -g @resurrect-hook-post-restore-all 'tmux kill-session -t 0'
#}}}
# {{{tmux-plugin-sysstat
set -g @sysstat_cpu_view_tmpl '#[fg=cyan]C:#[default] #[fg=#{cpu.color}]#{cpu.pused}#[default]'
set -g @sysstat_mem_view_tmpl '#[fg=cyan]M:#[default] #[fg=#{mem.color}]#{mem.pused}#[default]'
set -g status-interval 3
# }}}
# {{{tmux-prefix-highlight
set -g @prefix_highlight_fg 'colour00'
set -g @prefix_highlight_bg 'red'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=colour00,bg=colour05,bold'
set -g @prefix_highlight_prefix_prompt 'PREFIX'
set -g @prefix_highlight_copy_prompt 'COPY'
# }}}
# {{{tmux-fzf
TMUX_FZF_OPTIONS="-d 35%"
set -g @tmux-fzf-launch-key "a"
TMUX_FZF_MENU=\
"attach session\n/home/guerrafs/.tmux/plugins/tmux-fzf/scripts/session.sh attach\n"\
"rename window\n/home/guerrafs/.tmux/plugins/tmux-fzf/scripts/window.sh rename\n"
# }}}
# {{{tmux-scratchpad
set-option -g @scratch-command-key 'Tab'
#}}}
# }}}
set -g @tmux-fzf-launch-key "a"

Because you bind the key to a. You should press prefix + a to launch it.

it was working changing the source code in ~/.tmux/plugins/tmux-fzf/main.tmux

before

#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source "$CURRENT_DIR/settings.sh"

set_launch_bindings() {
	local key_bindings=$(get_tmux_option "$launch_key" "$default_launch_key")
	local key
	for key in $key_bindings; do
		tmux bind-key "$key" run-shell -b "$CURRENT_DIR/main.sh"
	done
}

set_launch_bindings

after

#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source "$CURRENT_DIR/settings.sh"

set_launch_bindings() {
	local key_bindings=$(get_tmux_option "$launch_key" "$default_launch_key")
	local key
	for key in $key_bindings; do
		tmux bind-key "$key" run-shell -b "$CURRENT_DIR/main.sh"
	done
}

# set_launch_bindings
tmux bind-key -T prefix F run-shell -b "$HOME/.tmux/plugins/tmux-fzf/main.sh"