-
-
Save Maple-pro/c3528b59bf2aaccaf1bcc459e6bd548a to your computer and use it in GitHub Desktop.
My `~/.oh-my-zsh/custom/themes/lambda.zsh-theme` file, which is a custom oh-my-zsh theme based on lambda.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function precmd_get_conda_env_name() { | |
if [[ -n $CONDA_PREFIX ]]; then | |
if [[ $(basename $CONDA_PREFIX) == "mambaforge" ]]; then | |
CONDA_ENV="base" | |
else | |
CONDA_ENV="$(basename $CONDA_PREFIX)" | |
fi | |
else | |
CONDA_ENV="" | |
fi | |
echo $CONDA_ENV | |
} | |
PROMPT='%{$fg[blue]%}%n@%m%{$reset_color%} %(?:%{$fg_bold[green]%}➜:%{$fg_bold[red]%}➜)%{$reset_color%} ($(precmd_get_conda_env_name)) λ %~/ $(git_prompt_info)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
~/.zshrc
~/.oh-my-zsh/custom/themes/
conda config --set changeps1 false