automatically start tmux when you are not inside of tmux
This commit is contained in:
parent
d6522ccca2
commit
de5e1fc18e
2 changed files with 18 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in a new issue