diff --git a/tag-tmux/tmux.conf b/tag-tmux/tmux.conf index f24a2f1..4912ab5 100644 --- a/tag-tmux/tmux.conf +++ b/tag-tmux/tmux.conf @@ -35,6 +35,8 @@ set -g renumber-windows on # Break a pane into a new window. bind-key b break-pane -d +bind-key C-j choose-tree + # Use vim keybindings in copy mode setw -g mode-keys vi @@ -45,3 +47,9 @@ bind-key -T copy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcop # Update default binding of `Enter` to also use copy-pipe unbind -T copy-mode-vi Enter bind-key -T copy-mode-vi 'Enter' send -X copy-pipe "reattach-to-user-namespace pbcopy" + +bind C-j split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t" + +bind-key C-b send-keys 'tat && exit' 'C-m' +bind-key K run-shell 'tmux switch-client -n \; kill-session -t "$(tmux display-message -p "#S")" || tmux kill-session' +