From 35841606e0cc60387eefcaedf101ff48db6f5288 Mon Sep 17 00:00:00 2001 From: andrey_varnavskiy Date: Sat, 30 Nov 2024 16:15:16 +0500 Subject: [PATCH] tmux autostart --- home-manager/modules/zsh.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/home-manager/modules/zsh.nix b/home-manager/modules/zsh.nix index ac472c6..ca8f204 100644 --- a/home-manager/modules/zsh.nix +++ b/home-manager/modules/zsh.nix @@ -30,5 +30,12 @@ history.size = 10000; history.path = "${config.xdg.dataHome}/zsh/history"; + + initExtra = '' + # Start Tmux automatically if not already running + if [ -z "$TMUX" ]; then + tmux attach-session -t default || tmux new-session -s default + fi + ''; }; }