2016-04-28 17:51:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
######
|
|
|
|
# Sojourner: My Default Session
|
|
|
|
###
|
|
|
|
|
|
|
|
tmux has-session -t Sojourner &>/dev/null
|
2016-08-28 17:54:57 +00:00
|
|
|
# If there is no session named Sojourner
|
2016-04-28 17:51:11 +00:00
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
2016-08-28 17:54:57 +00:00
|
|
|
# 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
|
2016-04-28 17:51:11 +00:00
|
|
|
tmux select-pane -t Sojourner:1.1
|
|
|
|
fi
|
2016-08-28 17:54:57 +00:00
|
|
|
# Attack to the Sojourner session
|
2016-04-28 17:51:11 +00:00
|
|
|
tmux attach -t Sojourner
|