conf2/zsh/.zshrc.d/prompt
2022-04-21 19:59:51 +02:00

32 lines
997 B
Plaintext

#setting prompt
#call powerline
#if [ -f `which powerline-daemon` ]; then
#powerline-daemon -q
#. /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh
#fi
##set zsh theme et dircolor en fonction de term
if [ $TERM != "linux" ]; then
POWERLEVEL9K_MODE="awesome-fontconfig"
ZSH_THEME="powerlevel10k/powerlevel10k"
eval `dircolors ~/.dircolors/dircolors.256dark`
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh context dir rbenv vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status virtualenv root_indicator background_jobs history time)
else
ZSH_THEME="rkj-repos"
eval `dircolors ~/.dircolors/dircolors.ansi-dark`
fi
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
#launch tmux on ssh connection
##if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]]; then
tmux new-session -t $(hostname) || tmux new-session -s $(hostname)
fi
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
fi