Files
zpower/files/tmux-ssh.zsh
Bradley Richins b25fde0812 Initial commit
2020-04-07 20:05:59 -06:00

14 lines
344 B
Bash

if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
tmux has-session -t remote 2>/dev/null
if [ $? != 0 ]; then
exec tmux new-session -s remote
else
exec tmux attach-session -t remote
fi
fi
if [ "$SSH_CONNECTION" != "" ]; then
tmux source-file $HOME/.tmux.conf.ssh
else
tmux source-file $HOME/.tmux.conf
fi