From 46dbd0c4bb7397a7a4f950d59dc5a205d4847f99 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sun, 16 Oct 2022 09:48:51 +0200 Subject: [PATCH] change handling of tmux --- modules/shell/tmux.nix | 2 +- modules/shell/zsh.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/shell/tmux.nix b/modules/shell/tmux.nix index 0b3edfc..0339c70 100644 --- a/modules/shell/tmux.nix +++ b/modules/shell/tmux.nix @@ -9,7 +9,7 @@ tmux = { enable = true; terminal = "xterm-256color"; - newSession = true; + newSession = false; keyMode = "vi"; historyLimit = 10000; clock24 = true; diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index 325e757..fd1c6da 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -22,7 +22,7 @@ initExtraFirst = '' # very first inits in zshrc if [[ $DISPLAY ]]; then [[ $- != *i* ]] && return - tmux attach + [[ -z "$TMUX" ]] && (tmux attach || tmux new-session) fi '';