diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index 148991fec..1d2af3458 100644 --- a/themes/af-magic.zsh-theme +++ b/themes/af-magic.zsh-theme @@ -10,9 +10,14 @@ typeset +H my_orange="$FG[214]" # separator dashes size function afmagic_dashes { - [[ -n "${VIRTUAL_ENV-}" && -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" && "$PS1" = \(* ]] \ - && echo $(( COLUMNS - ${#VIRTUAL_ENV} - 3 )) \ - || echo $COLUMNS + local PYTHON_ENV="$VIRTUAL_ENV" + [[ -z "$PYTHON_ENV" ]] && PYTHON_ENV="$CONDA_DEFAULT_ENV" + + if [[ -n "$PYTHON_ENV" && "$PS1" = \(* ]]; then + echo $(( COLUMNS - ${#PYTHON_ENV} - 3 )) + else + echo $COLUMNS + fi } # primary prompt