Update .tmux script
This commit is contained in:
parent
12001b588a
commit
bf4789fb11
10
.tmux
10
.tmux
|
@ -14,16 +14,10 @@ fi
|
|||
tmux new-session -d -s "${session_name}" -n vim -c "${session_path}"
|
||||
|
||||
# 1. Main window: Vim
|
||||
tmux split-pane -t "${session_name}:vim" -h -c "${session_path}"
|
||||
tmux send-keys -t "${session_name}:vim.left" "nvim +GoToFile" Enter
|
||||
tmux send-keys -t "${session_name}:vim.right" "git status" Enter
|
||||
tmux send-keys -t "${session_name}:vim" "nvim +GoToFile" Enter
|
||||
|
||||
# 2. General shell use.
|
||||
tmux new-window -t "${session_name}" -c "${session_path}"
|
||||
|
||||
if [[ -n "${TMUX:-}" ]]; then
|
||||
tmux switch-client -t "${session_name}"
|
||||
tmux select-window -t "${session_name}:vim.left"
|
||||
else
|
||||
tmux switch-client -t "${session_name}:vim.left" ||
|
||||
tmux attach -t "${session_name}:vim.left"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue