dotfiles/tmux/SojournerTmux
2017-07-28 18:41:47 -04:00

22 lines
626 B
Bash
Executable file

#!/bin/bash
######
# Sojourner: My Default Session
###
tmux has-session -t Sojourner &>/dev/null
# If there is no session named Sojourner
if [ $? != 0 ]
then
# Create a new session named Sojourner
tmux new-session -s Sojourner -d -c ~/
# Window 1: Triple-pane, top-left is Vim
tmux send-keys -t Sojourner:1.1 'vim' C-m
# Window 2: 4-pane, main-vertical layout
tmux new-window -c ~/
# Window 3: Single, full-size pane
tmux new-window -c ~/
# Focus on the first window, first pane
tmux select-pane -t Sojourner:1.1
fi
# Attack to the Sojourner session
tmux attach -t Sojourner