2017-02-17 00:08:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-19 10:55:43 +00:00
|
|
|
source "${HOME}/bin/script_framework.sh"
|
2017-09-19 09:17:41 +00:00
|
|
|
|
|
|
|
[ -n "${TMUX}" ] && fail "You are already in tmux!"
|
2018-03-10 11:47:55 +00:00
|
|
|
(which tmux 2>/dev/null) || fail "No tmux found, can't continue"
|
2017-02-17 00:08:50 +00:00
|
|
|
|
2017-03-05 15:21:46 +00:00
|
|
|
tmux-agent
|
2017-09-19 09:11:21 +00:00
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
if ! (tmux list-sessions); then
|
2017-09-19 09:11:21 +00:00
|
|
|
tmux new-session -d
|
2018-05-11 07:59:24 +00:00
|
|
|
tmux rename-window -t 1 home
|
2017-09-19 09:11:21 +00:00
|
|
|
tmux split-window -h
|
2018-05-11 07:59:24 +00:00
|
|
|
|
|
|
|
tmux new-window -n work -t 2
|
|
|
|
tmux select-window -t 2
|
|
|
|
tmux split-window -h
|
|
|
|
|
|
|
|
tmux select-window -t 1
|
2017-09-19 09:11:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
tmux attach-session -t $(tmux list-sessions | sort -n | head -n1 | cut -d: -f1)
|