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!"
|
|
|
|
( 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
|
|
|
|
|
|
|
if ! ( tmux list-sessions ); then
|
|
|
|
tmux new-session -d
|
|
|
|
tmux split-window -h
|
|
|
|
fi
|
|
|
|
|
|
|
|
tmux attach-session -t $(tmux list-sessions | sort -n | head -n1 | cut -d: -f1)
|