From 58572c2bffaff3d7b18ff58163ced78699039f62 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Mon, 18 Oct 2021 09:18:35 -0600 Subject: Found an easy solution for fzf session jumping --- stow/tmux/.tmux.conf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/stow/tmux/.tmux.conf b/stow/tmux/.tmux.conf index c250ab5..fc24203 100644 --- a/stow/tmux/.tmux.conf +++ b/stow/tmux/.tmux.conf @@ -47,11 +47,15 @@ bind -Tcopy-mode-vi Enter send -X copy-pipe "tmux save-buffer - | xp" # clock mode is over written by sessionist bind C-t clock-mode # Use fzf for switching sessions -# There is something wrong with fzf-tmux and tmux 3.2 and hasn't been fixed yet -# https://github.com/junegunn/fzf/pull/2379 -# But I need tmux 3.2 because 3.2-rc was randomly crashing so no fzf-tmux for now -# unbind s -# bind s run-shell '~/.tmux/scripts/tmux_session_fzf' +unbind s +bind s \ + display-popup \ + -E \ + "tmux list-sessions \ + | sed -E 's/:.*$//' \ + | grep -v \"^$(tmux display-message -p '#S')\$\" \ + | fzf --reverse \ + | xargs tmux switch-client -t" # Renumber the windows bind C-w run-shell "~/.tmux/scripts/window_renum" -- cgit v1.2.3