diff --git a/config/home-manager/base.nix b/config/home-manager/base.nix index 521e428f..2de18071 100644 --- a/config/home-manager/base.nix +++ b/config/home-manager/base.nix @@ -11,7 +11,13 @@ enable = true; }; initExtraBeforeCompInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - initExtra = "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh"; + initExtra = '' + [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + + if [[ ! $TMUX ]]; then + ${pkgs.tmux} attach-session -t $USER || ${pkgs.tmux} new-session -s $USER + fi + ''; }; }; home.file.".p10k.zsh".source = ./.p10k.zsh; diff --git a/config/programs/tmux.nix b/config/programs/tmux.nix index 3c36d4e8..197d04d8 100644 --- a/config/programs/tmux.nix +++ b/config/programs/tmux.nix @@ -7,6 +7,17 @@ sensibleOnTop = true; plugins = with pkgs.tmuxPlugins; [ power-theme + cpu + { + plugin = tmuxPlugins.resurrect; + extraConfig = "set -g @resurrect-strategy-nvim 'session'"; + } + { + plugin = tmuxPlugins.continuum; + extraConfig = '' + set -g @continuum-restore 'on' + ''; + } ]; extraConfig = ''