cfg/bin/resume
Knut Ahlers a2727dbe89
Use script_framework for resume script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-09-19 12:55:43 +02:00

16 lines
350 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)