Last active
April 13, 2023 12:57
-
-
Save devlato/19c8476858aebc2b55cd33ff733c626d to your computer and use it in GitHub Desktop.
A custom, much more fast a responsive gentoo theme for `oh-my-zsh`
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
# Add this file to ~/.oh-my-zsh/themes/gentoo-custom.zsh-theme | |
# Then, in your ~/.zshrc, set ZSH_THEME to "gentoo-custom" like this: | |
# ZSH_THEME=gentoo-custom | |
function prompt_char { | |
if [ $UID -eq 0 ]; then echo "#"; else echo $; fi | |
} | |
git_branch() { | |
local branch=$(git rev-parse --abbrev-ref HEAD 2>&1) | |
if [[ $branch == *fatal* ]]; then | |
echo ''; | |
else | |
echo " (${branch})" | |
fi | |
} | |
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~)$(git_branch) $(prompt_char)%{$reset_color%} ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="(" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=") " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment