Skip to content

Instantly share code, notes, and snippets.

@philFernandez
Last active November 8, 2021 11:41
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philFernandez/56f8953722285834cc9000ffcfe103f4 to your computer and use it in GitHub Desktop.
Save philFernandez/56f8953722285834cc9000ffcfe103f4 to your computer and use it in GitHub Desktop.
A theme for oh-my-zsh called philthy.
#
# Requires a nerdfont compatible font to display properly
#
# https://github.com/ryanoasis/nerd-fonts
#
#
function last_two_dir {
# if we're at ~/ just display ~
if [ $PWD = $HOME ]; then
echo '%c'
# display cwd and parent directory
else
echo '%2d'
fi
}
function display_git {
if [ $(git_current_branch) ]; then
echo " {$(git_current_branch)}"
fi
}
local cwd_color=214
local git_branch_color=001
local arrow_color=082
local arrow=''
# add indicator for when inside vim spawned shell
if [ $VIMRUNTIME ]; then
arrow_color=196
arrow=' '
fi
PROMPT='%{$FG[$cwd_color]%}$(last_two_dir)%{$FG[$git_branch_color]%}$(display_git) \
%{$FG[$arrow_color]%}$arrow%{$reset_color%} '
RPROMPT='$(git_prompt_status)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
@philFernandez
Copy link
Author

Philthy Theme for Oh-My-ZSH

requires nerdfont

img

img

@marcuxyz
Copy link

arrow ins't work :(

@philFernandez
Copy link
Author

arrow ins't work :(

It requires a nerdfont

@DeppWang
Copy link

DeppWang commented Jul 6, 2020

If want to display arrow. I have to install nerd-fonts?

@philFernandez
Copy link
Author

If want to display arrow. I have to install nerd-fonts?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment