From 4ed3b37877b2a8339179cdb4dcc90bc8d07320e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin-Charles=20Guih=C3=A9neuf?= Date: Thu, 10 Sep 2026 17:06:50 +0200 Subject: [PATCH] Theme --- .zshrc | 1 + vulporuza.zsh-theme | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.zshrc b/.zshrc index 56c628a..7d6ccfe 100644 --- a/.zshrc +++ b/.zshrc @@ -70,6 +70,7 @@ ZSH_THEME="vulporuza" # Add wisely, as too many plugins slow down shell startup. plugins=( gitfast + virtualenv zsh-syntax-highlighting zsh-autosuggestions # zsh-history-substring-search diff --git a/vulporuza.zsh-theme b/vulporuza.zsh-theme index d8114ed..002fcb3 100644 --- a/vulporuza.zsh-theme +++ b/vulporuza.zsh-theme @@ -4,22 +4,28 @@ typeset my_gray="$FG[240]" # Primary prompt if [ -z "${__GIT_PROMPT_DIR}" ]; then - PS1='$my_gray${(r:$COLUMNS::-:)}%{$reset_color%}╭ %T %{$FG[208]%}%~%{$reset_color%}$(git_prompt_info) -╰ %(!.#.») ' + PS1='$my_gray${(r:$COLUMNS::-:)}%{$reset_color%} +╭ %T %{$FG[208]%}%~%{$reset_color%}$(git_prompt_info) +╰$(virtualenv_prompt_info) %(!.#.») ' else - PS1='$my_gray${(r:$COLUMNS::-:)}%{$reset_color%}╭ %T %{$FG[208]%}%~%{$reset_color%}$(git_super_status) -╰ %(!.#.») ' + PS1='$my_gray${(r:$COLUMNS::-:)}%{$reset_color%} +╭ %T %{$FG[208]%}%~%{$reset_color%}$(git_super_status) +╰$(virtualenv_prompt_info) %(!.#.») ' fi PS2='%{$fg[red]%}\ %{$reset_color%}' # Right prompt -RPS1='%(?..%{$fg[red]%}%? ↵%{$reset_color%}) $FG[245]%n@%m%{$reset_color%}%' +RPS1='%(?..%{$fg[red]%}%? ↵%{$reset_color%}) $FG[245]%n@%m%{$reset_color%}' + +# Virtualenv (plugin virtualenv) +ZSH_THEME_VIRTUALENV_PREFIX=" %{$FG[075]%}(" +ZSH_THEME_VIRTUALENV_SUFFIX=")%{$reset_color%}" # Git theme ZSH_THEME_GIT_PROMPT_PREFIX=" %{$reset_color%}[" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]" -if [ -z "${__GIT_PROMPT_DIR}" ]; then +if [ -z "${__GIT_PROMPT_DIR}" ]; then # git settings ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}|%{$FG[034]%}✔" ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}|%{$FG[075]%}…" @@ -45,11 +51,11 @@ else fi function theme_preexec { - print -nr $'\e]2;'"$USER@$(hostname) » $PWD » $1 $2"$'\a' + print -nr $'\e]2;'"$USER@$HOST » $PWD » $1"$'\a' } add-zsh-hook preexec theme_preexec function theme_precmd { - print -nr $'\e]2;'"$USER@$(hostname) » $PWD"$'\a' + print -nr $'\e]2;'"$USER@$HOST » $PWD"$'\a' } add-zsh-hook precmd theme_precmd