add tmux default launch

This commit is contained in:
vincent 2022-04-05 22:10:22 +02:00
parent 7ebce5c384
commit 2bcea02c91

View File

@ -5,7 +5,7 @@
#. /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh #. /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh
#fi #fi
##set zsh theme et dircolor en fonction de term ##set zsh theme et dircolor en fonction de term
if [ $TERM != "linux" ]; then if [ $TERM != "linux" ]; then
POWERLEVEL9K_MODE="awesome-fontconfig" POWERLEVEL9K_MODE="awesome-fontconfig"
ZSH_THEME="powerlevel10k/powerlevel10k" ZSH_THEME="powerlevel10k/powerlevel10k"
eval `dircolors ~/.dircolors/dircolors.256dark` eval `dircolors ~/.dircolors/dircolors.256dark`
@ -13,14 +13,15 @@ if [ $TERM != "linux" ]; then
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status virtualenv root_indicator background_jobs history time) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status virtualenv root_indicator background_jobs history time)
else else
ZSH_THEME="rkj-repos" ZSH_THEME="rkj-repos"
eval `dircolors ~/.dircolors/dircolors.ansi-dark` eval `dircolors ~/.dircolors/dircolors.ansi-dark`
fi fi
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
#launch tmux on ssh connection #launch tmux on ssh connection
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then ##if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]]; then
tmux attach-session -t $(hostname) || tmux new-session -s $(hostname)
fi fi