Run command (TMUX) on login via SSH

This commit is contained in:
Jan Jastrow 2024-08-10 19:34:07 +02:00
parent b9fce71df9
commit b08e40c082

5
zshrc
View File

@ -12,6 +12,11 @@ prompt_color2="#000000"
# Load zsh settings
source "$HOME/.dotfiles/zsh/settings"
# Run command when connected via SSH
if [[ $- =~ i ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_TTY" ]]; then
tmux attach-session -t default || tmux new-session -s default
fi
# Define platform
platform='Unknown'
if [[ $(uname) == 'Linux' ]]; then