From 4f2f79407203f10366ee9bc4c419dedf527f7854 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sun, 3 Mar 2024 09:52:53 +0200 Subject: [PATCH] Only launch zellij in SSH --- home/.config/zsh/01-zellij.zsh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/home/.config/zsh/01-zellij.zsh b/home/.config/zsh/01-zellij.zsh index f3d76ee4..d8dfb94b 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