Skip to content

Instantly share code, notes, and snippets.

#if placed at the end of your .zshrc this wil automaticly start and attach tmux.
#When you attach from a new session, it wil close your previous terminal.
#start tmux defaultly
if which tmux >/dev/null 2>&1; then
#if not inside a tmux session, and if no session is started, start a new session
test -z "$TMUX" && (tmux a -d || tmux new-session)
fi