aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2021-10-18 09:18:35 -0600
committerCody Hiar <cody@hiar.ca>2021-10-18 09:18:35 -0600
commit58572c2bffaff3d7b18ff58163ced78699039f62 (patch)
tree75f57258c7b3650f4818049f78442359bd3a6e82
parent17c16aa6b332652285008f99b2b63dd490464147 (diff)
Found an easy solution for fzf session jumping
-rw-r--r--stow/tmux/.tmux.conf14
1 files 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"