Skip to content

Instantly share code, notes, and snippets.

@MuhsinFatih
Last active January 9, 2018 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MuhsinFatih/5f8aaa3751588952cd9c5b3478f82795 to your computer and use it in GitHub Desktop.
Save MuhsinFatih/5f8aaa3751588952cd9c5b3478f82795 to your computer and use it in GitHub Desktop.
My custom zsh theme
# Easily readable, pretty, packs the most important information, shows git status, and shows a "wireless" symbol when connected via ssh
BOLD_GREEN="%{$fg_bold[green]%}"
BOLD_YELLOW="%{$fg_bold[yellow]%}"
BOLD_CYAN="%{$fg_bold[cyan]%}"
BOLD_RED="%{$fg_bold[red]%}"
GREEN="%{$fg[green]%}"
YELLOW="%{$fg[yellow]%}"
CYAN="%{$fg[cyan]%}"
RED="%{$fg[red]%}"
RESET="%{$reset_color%}"
MAGENTA="%{$fg[magenta]%}"
WHITE="%{$fg[white]%}"
local ret_status="%(?:$BOLD_GREEN➜ :$BOLD_RED➜ )"
local host_name="$CYAN%n"
function ssh_connection() {
if [[ -n $SSH_CONNECTION ]]; then
echo " %{$fg[magenta]%}\uf1eb "
else
echo "%{\e[37;2m%]%}@${RESET}"
fi
}
PROMPT='${host_name}$(ssh_connection)$MAGENTA%m% [$WHITE%~${MAGENTA}] $(git_prompt_info)$CYAN${ret_status}${RESET} %'
ZSH_THEME_GIT_PROMPT_PREFIX="$BOLD_YELLOW $CYAN"
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
ZSH_THEME_GIT_PROMPT_DIRTY=" $BOLD_RED⦿"
ZSH_THEME_GIT_PROMPT_CLEAN=" $BOLD_GREEN⦾"
@MuhsinFatih
Copy link
Author

MuhsinFatih commented Jan 9, 2018

Screenshot:
image
image

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