diff --git a/home/.config/zsh/01-zellij.zsh b/home/.config/zsh/01-zellij.zsh index f3d76ee..d8dfb94 100644 --- a/home/.config/zsh/01-zellij.zsh +++ b/home/.config/zsh/01-zellij.zsh @@ -1,9 +1,4 @@ -if [[ -z "$ZELLIJ" ]]; then - # Launch or attach to existing session if logging in over ssh - if [[ -n "$SSH_CONNECTION" ]]; then - exec zellij attach -c SSH - # Launch a new local session otherwise - else - exec zellij - fi + # Launch or attach zellij to existing session if logging in over ssh +if [[ -z "$ZELLIJ" && -n "$SSH_CONNECTION" ]]; then + exec zellij attach -c SSH fi