diff --git a/home-manager/common/software/cli/fish.nix b/home-manager/common/software/cli/fish.nix index 7c409b5d..c653fa9e 100644 --- a/home-manager/common/software/cli/fish.nix +++ b/home-manager/common/software/cli/fish.nix @@ -7,9 +7,12 @@ interactiveShellInit = '' set EDITOR vim ssh-add > /dev/null &> /dev/null - if not set -q TMUX && not set -q DISABLE_TMUX - tmux attach || exec tmux new-session - exit + if not set -q TMUX && not set -q DISABLE_TMUX + if tmux has-session -t main + tmux attach-session -t main + else + exec tmux new-session -t main + end end '';