2017-02-17 01:08:50 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-19 12:55:43 +02:00
|
|
|
source "${HOME}/bin/script_framework.sh"
|
2017-09-19 11:17:41 +02:00
|
|
|
|
|
|
|
[ -n "${TMUX}" ] && fail "You are already in tmux!"
|
|
|
|
( which tmux 2>/dev/null ) || fail "No tmux found, can't continue"
|
2017-02-17 01:08:50 +01:00
|
|
|
|
2017-03-05 16:21:46 +01:00
|
|
|
tmux-agent
|
2017-09-19 11:11:21 +02: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)
|