Last active
June 13, 2023 17:53
-
-
Save wyw/14fc4d337b878f73ebe6be50c6c86089 to your computer and use it in GitHub Desktop.
Yet Another 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
# https://www.ditig.com/256-colors-cheat-sheet | |
local OMZ_THEME_FRUIT_COLOR=161 | |
local OMZ_THEME_LEAF_COLOR=77 | |
local OMZ_THEME_GIT_LOGO_THEME_COLOR=202 | |
local OMZ_THEME_PROMPT_STRING_COLOR=12 | |
local OMZ_THEME_BACKGROUND_COLOR=236 | |
local OMZ_THEME_NEWLINE=$'\n' | |
[[ "$USERNAME" == 'root' ]] && OMZ_THEME_PROMPT_STRING_COLOR=9 | |
local OMZ_THEME_FOUR_DOTS="%F{$OMZ_THEME_FRUIT_COLOR}∷%f " | |
local OMZ_THEME_WORKING_DIRECTORY="%F{$OMZ_THEME_LEAF_COLOR}%3~%f " | |
ZSH_THEME_GIT_PROMPT_PREFIX="%F{$OMZ_THEME_GIT_LOGO_THEME_COLOR}‹" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="›%f " | |
local OMZ_THEME_PROMPT_STRING="${OMZ_THEME_NEWLINE} %F{$OMZ_THEME_PROMPT_STRING_COLOR}»%f " | |
PROMPT='%K{$OMZ_THEME_BACKGROUND_COLOR} ${SHORT_HOST:-$HOST} ${OMZ_THEME_FOUR_DOTS}${OMZ_THEME_WORKING_DIRECTORY}$(git_prompt_info)${OMZ_THEME_PROMPT_STRING}%k ' | |
local OMZ_THEME_RETURN_CODE="%(?..%K{$OMZ_THEME_BACKGROUND_COLOR}%F{$OMZ_THEME_FRUIT_COLOR}%?%f %F{$OMZ_THEME_FRUIT_COLOR}⤾%f%k)" | |
RPS1='${OMZ_THEME_RETURN_CODE}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment