From 6e55fa0a59ee3063b3e2980117a9d6cf078891e8 Mon Sep 17 00:00:00 2001 From: Bad Date: Fri, 16 Apr 2021 11:03:26 +0200 Subject: [PATCH] Add dnot die to tmux --- users/profiles/zsh/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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"