Improve window creation with a default horizontal split

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-09-19 11:11:21 +02:00
parent 813da00b23
commit 7374309c37
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -3,4 +3,10 @@
[ -n "${TMUX}" ] && exit 1
tmux-agent
tmux attach-session -t $(tmux list-sessions | sort -n | head -n1 | cut -d: -f1) || tmux
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)