switches to tmuxinator instead of cobbled together script
This commit is contained in:
parent
80d3dd69af
commit
6a7193ab14
16 changed files with 135 additions and 17 deletions
|
|
@ -60,25 +60,13 @@
|
|||
end
|
||||
'';
|
||||
sessionizer = /* fish */ ''
|
||||
set -l selected (dev_projects | fzf --prompt "sessionize >> ")
|
||||
set -l selected (tmuxinator ls | fzf --prompt "switch to >> ")
|
||||
|
||||
if test -z "$selected"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l session_name (basename $selected)
|
||||
set -l tmux_running (pgrep tmux)
|
||||
|
||||
if test -z $TMUX && test -z $tmux_running
|
||||
tmux new-session -s $session_name -c $selected
|
||||
return 0
|
||||
end
|
||||
|
||||
if not tmux has-session -t=$session_name 2> /dev/null
|
||||
tmux new-session -ds $session_name -c $selected
|
||||
end
|
||||
|
||||
tmux switch-client -t $session_name
|
||||
tmuxinator start "$selected"
|
||||
'';
|
||||
tmux_sessionizer = /* fish */ ''
|
||||
tmux display-popup -h 50% -w 80% -E sessionizer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue