Skip to content

Instantly share code, notes, and snippets.

@philFernandez
Last active July 15, 2024 20:56
Show Gist options
  • 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]%} ✭"
@interbattles
Copy link

is this a joke

@philFernandez
Copy link
Author

is this a joke

Yes, and you are the punchline

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