1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-14 15:51:30 +01:00
dotfiles/extras/automatic_tmux_login.sh

Failed to ignore revisions in .git-blame-ignore-revs.

11 lines
256 B
Bash
Raw Normal View History

#_tmux_sourced=1 exec tmux
if [[ -z $TMUX ]] && [[ -n $SSH_TTY ]]; then
session=tmux
if tmux has-session -t "$session" 2>/dev/null; then
exec tmux attach-session -t "$session"
else
exec tmux new-session -s "$session"
fi
fi