Created
December 28, 2023 15:38
-
-
Save estherjk/0e81ec4ec17df64232cb743ed21132a5 to your computer and use it in GitHub Desktop.
Custom oh-my-zsh theme
This file contains hidden or 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
# 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