Last active
December 4, 2019 09:03
-
-
Save Mitscherlich/5f7334044b8a72be8431c7ff95ffebdf to your computer and use it in GitHub Desktop.
Yet another oh-my-zsh theme -- Amber
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
# Inspired by zsh theme robbyrussell, bira, bureau and node | |
# oh-my-zsh Theme Amber | |
### NVM | |
ZSH_THEME_NVM_PROMPT_PREFIX="%{$fg_bold[green]%}⬢%{$reset_color%} " | |
ZSH_THEME_NVM_PROMPT_SUFFIX="" | |
### Git [±master ▾●] | |
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[cyan]%}▴%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}" | |
### Subversion [±master ▾●] | |
ZSH_THEME_SVN_PROMPT_PREFIX="[%{$fg_bold[green]%}±%{$reset_color%}%{$fg_bold[white]%}" | |
ZSH_THEME_SVN_PROMPT_SUFFIX="%{$reset_color%}]" | |
ZSH_THEME_SVN_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}" | |
ZSH_THEME_SVN_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}" | |
ZSH_THEME_SVN_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}" | |
ZSH_THEME_SVN_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}" | |
git_branch() { | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
echo "${ref#refs/heads/}" | |
} | |
git_status() { | |
_STATUS="" | |
# check status of files | |
_INDEX=$(command git status --porcelain 2> /dev/null) | |
if [[ -n "$_INDEX" ]]; then | |
if $(echo "$_INDEX" | command grep -q '^[AMRD]. '); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED" | |
fi | |
if $(echo "$_INDEX" | command grep -q '^.[MTD] '); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED" | |
fi | |
if $(echo "$_INDEX" | command grep -q -E '^\?\? '); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED" | |
fi | |
if $(echo "$_INDEX" | command grep -q '^UU '); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED" | |
fi | |
else | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_CLEAN" | |
fi | |
# check status of local repository | |
_INDEX=$(command git status --porcelain -b 2> /dev/null) | |
if $(echo "$_INDEX" | command grep -q '^## .*ahead'); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD" | |
fi | |
if $(echo "$_INDEX" | command grep -q '^## .*behind'); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND" | |
fi | |
if $(echo "$_INDEX" | command grep -q '^## .*diverged'); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED" | |
fi | |
if $(command git rev-parse --verify refs/stash &> /dev/null); then | |
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED" | |
fi | |
echo $_STATUS | |
} | |
git_prompt_info() { | |
local _branch=$(git_branch) | |
local _status=$(git_status) | |
local _result="" | |
if [[ "${_branch}x" != "x" ]]; then | |
_result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch" | |
if [[ "${_status}x" != "x" ]]; then | |
_result="$_result $_status" | |
fi | |
_result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
fi | |
echo $_result | |
} | |
svn_repo() { | |
echo "$(svn_get_repo_name)" | |
} | |
svn_status() { | |
_STATUS="" | |
# check status of files | |
_INDEX=$(command svn status 2> /dev/null) | |
if [[ -n "$_INDEX" ]]; then | |
if $(echo "$_INDEX" | command grep -q '^.[M]'); then | |
_STATUS="$_STATUS$ZSH_THEME_SVN_PROMPT_UNSTAGED" | |
fi | |
if $(echo "$_INDEX" | command grep -q -E '^\?'); then | |
_STATUS="$_STATUS$ZSH_THEME_SVN_PROMPT_UNTRACKED" | |
fi | |
else | |
_STATUS="$STATUS$ZSH_THEME_SVN_PROMPT_CLEAN" | |
fi | |
# check status of remote repository | |
_INDEX=$(command svn status -u 2> /dev/null) | |
if $(echo "$_INDEX" | command grep -q '\*'); then | |
_STATUS="$_STATUS$ZSH_THEME_SVN_PROMPT_BEHIND" | |
fi | |
echo $_STATUS | |
} | |
svn_prompt_info() { | |
local _result="" | |
if in_svn; then | |
local _repo=$(svn_repo) | |
local _status=$(svn_status) | |
_result="$ZSH_THEME_SVN_PROMPT_PREFIX$_repo" | |
if [[ "${_status}x" != "x" ]]; then | |
_result="$_result $_status" | |
fi | |
_result="$_result$ZSH_THEME_SVN_PROMPT_SUFFIX" | |
fi | |
echo "$_result" | |
} | |
if [[ $UID -eq 0 ]]; then | |
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}' | |
local user_symbol='#' | |
else | |
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' | |
local user_symbol='$' | |
fi | |
local ret_status="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})" | |
PROMPT='╭─%{$fg[cyan]%}%c%{$reset_color%} $(nvm_prompt_info) $(git_prompt_info) $(svn_prompt_info) | |
╰─%B${ret_status}${user_symbol}%b%{$reset_color%} ' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.13333329558372498</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.13333329558372498</real> | |
<key>Red Component</key> | |
<real>0.13333329558372498</real> | |
</dict> | |
<key>Ansi 1 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.44705110788345337</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.16585716605186462</real> | |
<key>Red Component</key> | |
<real>0.97641903162002563</real> | |
</dict> | |
<key>Ansi 10 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.18039199709892273</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.88627439737319946</real> | |
<key>Red Component</key> | |
<real>0.65098053216934204</real> | |
</dict> | |
<key>Ansi 11 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.45490187406539917</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.85882359743118286</real> | |
<key>Red Component</key> | |
<real>0.90196079015731812</real> | |
</dict> | |
<key>Ansi 12 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.99999994039535522</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.50588232278823853</real> | |
<key>Red Component</key> | |
<real>0.68235296010971069</real> | |
</dict> | |
<key>Ansi 13 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.44705110788345337</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.16585716605186462</real> | |
<key>Red Component</key> | |
<real>0.97641903162002563</real> | |
</dict> | |
<key>Ansi 14 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.93725484609603882</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.85098034143447876</real> | |
<key>Red Component</key> | |
<real>0.40000003576278687</real> | |
</dict> | |
<key>Ansi 15 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.94883114099502563</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.97183603048324585</real> | |
<key>Red Component</key> | |
<real>0.97244399785995483</real> | |
</dict> | |
<key>Ansi 2 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.18039199709892273</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.88627439737319946</real> | |
<key>Red Component</key> | |
<real>0.65098053216934204</real> | |
</dict> | |
<key>Ansi 3 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.12156861275434494</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.59215688705444336</real> | |
<key>Red Component</key> | |
<real>0.99215692281723022</real> | |
</dict> | |
<key>Ansi 4 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.99999994039535522</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.50588232278823853</real> | |
<key>Red Component</key> | |
<real>0.68235296010971069</real> | |
</dict> | |
<key>Ansi 5 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.44705110788345337</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.16585716605186462</real> | |
<key>Red Component</key> | |
<real>0.97641903162002563</real> | |
</dict> | |
<key>Ansi 6 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.93725484609603882</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.85098034143447876</real> | |
<key>Red Component</key> | |
<real>0.40000003576278687</real> | |
</dict> | |
<key>Ansi 7 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.76078420877456665</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.81176471710205078</real> | |
<key>Red Component</key> | |
<real>0.81176477670669556</real> | |
</dict> | |
<key>Ansi 8 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.3686273992061615</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.44313716888427734</real> | |
<key>Red Component</key> | |
<real>0.45882350206375122</real> | |
</dict> | |
<key>Ansi 9 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.44705110788345337</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.16585716605186462</real> | |
<key>Red Component</key> | |
<real>0.97641903162002563</real> | |
</dict> | |
<key>Background Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.13333329558372498</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.13333329558372498</real> | |
<key>Red Component</key> | |
<real>0.13333329558372498</real> | |
</dict> | |
<key>Badge Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>0.5</real> | |
<key>Blue Component</key> | |
<real>0.0</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.1491314172744751</real> | |
<key>Red Component</key> | |
<real>1</real> | |
</dict> | |
<key>Bold Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.76078420877456665</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.81176471710205078</real> | |
<key>Red Component</key> | |
<real>0.81176477670669556</real> | |
</dict> | |
<key>Cursor Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.94117647409439087</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.97254902124404907</real> | |
<key>Red Component</key> | |
<real>0.97254914045333862</real> | |
</dict> | |
<key>Cursor Guide Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>0.25</real> | |
<key>Blue Component</key> | |
<real>1</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.9268307089805603</real> | |
<key>Red Component</key> | |
<real>0.70213186740875244</real> | |
</dict> | |
<key>Cursor Text Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.76078420877456665</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.81176471710205078</real> | |
<key>Red Component</key> | |
<real>0.81176477670669556</real> | |
</dict> | |
<key>Foreground Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.76078420877456665</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.81176471710205078</real> | |
<key>Red Component</key> | |
<real>0.81176477670669556</real> | |
</dict> | |
<key>Link Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.73423302173614502</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.35916060209274292</real> | |
<key>Red Component</key> | |
<real>0.0</real> | |
</dict> | |
<key>Selected Text Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.76078420877456665</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.81176471710205078</real> | |
<key>Red Component</key> | |
<real>0.81176477670669556</real> | |
</dict> | |
<key>Selection Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.26666668057441711</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.26666665077209473</real> | |
<key>Red Component</key> | |
<real>0.26666668057441711</real> | |
</dict> | |
<key>Tab Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Green Component</key> | |
<real>0.0</real> | |
<key>Red Component</key> | |
<real>0.0</real> | |
</dict> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment