From 9c9ab30bfd49381eb2b685101ef837b144a48704 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 17 Mar 2022 09:44:16 +0530 Subject: [PATCH] tmux: Change session selector --- tmux/.tmux.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index b9541b7..63d43dd 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -86,9 +86,11 @@ bind -T copy-mode-vi v send-keys -X begin-selection bind -T copy-mode-vi y send-keys -X copy-selection bind -T copy-mode-vi r send-keys -X rectangle-toggle +# Save scrollback buffer to a file bind S command-prompt -p 'Save history to filename:' -I '/tmp/tmux.history' 'capture-pane -S - -E -; save-buffer %1 ; delete-buffer' -bind T choose-tree -wZ +# Session selector +bind T display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t" # This effects color rendering and typing on terminal. set-option -g default-terminal "tmux-256color"