automatically start tmux when you are not inside of tmux

This commit is contained in:
Charlotte 🦝 Delenk 2022-01-21 09:32:36 +01:00
parent d6522ccca2
commit de5e1fc18e
Signed by: darkkirb
GPG key ID: 015E3768A70AFBC5
2 changed files with 18 additions and 1 deletions

View file

@ -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;

View file

@ -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 = ''