cfg/bin/resume
Knut Ahlers efc8bc4f3c
Throw shfmt against bash scripts
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-03-10 12:47:55 +01:00

15 lines
346 B
Bash
Executable file

#!/bin/bash
source "${HOME}/bin/script_framework.sh"
[ -n "${TMUX}" ] && fail "You are already in tmux!"
(which tmux 2>/dev/null) || fail "No tmux found, can't continue"
tmux-agent
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)