about summary refs log tree commit diff stats
path: root/nix-conf/home/includes
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-12 20:31:46 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-12 20:33:25 +0000
commita92ce69d3960a0506527b6a8e884a46c171fd69b (patch)
tree877de3838acfb46b45624e01d732c33784080a12 /nix-conf/home/includes
parentca4e381eb7a5100a57219c37cd1a3268d5031ed3 (diff)
downloaddotfiles-a92ce69d3960a0506527b6a8e884a46c171fd69b.tar.gz
Allow auto-attaching tmux when connecting via ssh
Diffstat (limited to 'nix-conf/home/includes')
-rw-r--r--nix-conf/home/includes/zsh.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix
index f08b299..95a8b1f 100644
--- a/nix-conf/home/includes/zsh.nix
+++ b/nix-conf/home/includes/zsh.nix
@@ -75,7 +75,7 @@
 
     initExtra = ''
       # Taken from prezto tmux plugin
-      if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && -z "$SSH_TTY" ]]; then
+      if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && (-z "$SSH_TTY" || -n "$TMUX_AUTO_ATTACH") ]]; then
         tmux start-server
 
         if ! tmux has-session 2> /dev/null; then