Skip to content

Instantly share code, notes, and snippets.

@estherjk
Created December 28, 2023 15:38
Show Gist options
  • Save estherjk/0e81ec4ec17df64232cb743ed21132a5 to your computer and use it in GitHub Desktop.
Save estherjk/0e81ec4ec17df64232cb743ed21132a5 to your computer and use it in GitHub Desktop.
Custom oh-my-zsh theme
# Modified robbyrussell theme w/ hostname
# Change hostname color to green for ssh connections
local hostname
if [[ -n $SSH_CONNECTION ]]; then
hostname="%{$fg_bold[green]%}%m"
else
hostname="%{%B$FG[250]%}%m"
fi
# Add hostname to beginning of prompt
PROMPT="${hostname} %(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg[cyan]%}%c%{$reset_color%}"
PROMPT+=' $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}%1{✗%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment