Add tmux fzf session chooser

Added tmux session chooser. Aliased to `tm`, calling `tmux_attach_start`
(the original tm script).

When called without arguments displays a fzf list of currently running
tmux sessions, with a preview to their respective open panes. A session
can be chosen in fzf which tmux will attach itself to. When creating a
query in fzf which does not have a valid target and confirming, tmux
will automatically create that session and attach itself to it.

When called with an argument, tmux will attach itself or create a
session of the same name. If called with the name of a session file, as
before, tmux will automatically execute that session file and attach
itself to it.
This commit is contained in:
Marty Oehme 2020-02-02 23:44:23 +01:00
parent fbc1c44652
commit 92376839a4
5 changed files with 71 additions and 2 deletions

View file

@ -7,6 +7,6 @@ select-pane -t 1
split-window -v watch -t -n 1 -c 'cd ~/.dotfiles; git -c color.ui=always log --graph --date=short --decorate --oneline --all --remotes'
select-pane -t 4
new-window -n code
send-keys "cd ~/.dotfiles; vim ." C-m I
send-keys "cd ~/.dotfiles; v ." C-m I
new-window -n test
select-window -t 1