From 7bac286d62bdd226e36f71a829983a39e50cfc30 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Fri, 3 Dec 2021 09:52:56 +0100 Subject: [PATCH] Add default Tmux session on ZSH startup --- .zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index a4e5f03..7427652 100644 --- a/.zshrc +++ b/.zshrc @@ -78,7 +78,6 @@ alias lc="docker container ls" alias vim="nvim" alias resource="source ~/.zshrc" -alias almond-dev="~/.tmux/almond-dev" # Dotfiles alias for easy dotfile management alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' @@ -100,3 +99,8 @@ alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode' alias gitcommiiiiiiiiiiiiiit='cz' alias clip='xclip -selection primary' + +# Finally, start a tmux session +[ -x "$(command -v tmux)" ] \ + && [ -z "${TMUX}" ] \ + && { tmux attach || tmux new -s Halia -n Local -d && tmux attach; }