diff --git a/users/profiles/zsh/default.nix b/users/profiles/zsh/default.nix index 229757b..74c9808 100644 --- a/users/profiles/zsh/default.nix +++ b/users/profiles/zsh/default.nix @@ -10,13 +10,17 @@ ]; }; initExtraFirst = '' - if [ -z "$TMUX" ] && [[ $- == *i* ]] + if [ -z "$TMUX" ] && [[ $- == *i* ]] + then + (tmux ls | grep -vq attached && tmux at) || tmux + if [ ! -f /tmp/dontdie ] then - (tmux ls | grep -vq attached && tmux at) || tmux - exit + exit fi + rm /tmp/dontdie + fi - ${builtins.readFile ./p10k.zsh.initfirst} + ${builtins.readFile ./p10k.zsh.initfirst} ''; initExtra = '' source "${pkgs.fzf}/share/fzf/key-bindings.zsh"