Created
February 14, 2017 23:04
-
-
Save TheBITLINK/89c22ce542f1e548cd49ba86cb5c0979 to your computer and use it in GitHub Desktop.
This file contains 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
# | |
# TheBITLINK's zsh theme. | |
# | |
# Based on my own .bashrc (https://gist.github.com/TheBITLINK/0c4021ea5a82835afa3750c0e0ef293b) | |
# | |
# # README | |
# | |
# This uses some charactew from [Powerline Fonts](https://github.com/Lokaltog/powerline-fonts). | |
# | |
case ${SOLARIZED_THEME:-dark} in | |
light) fgc=black;; | |
*) fgc=white;; | |
esac | |
local w="%{$fg[$fgc]%}" # White color | |
precmd() { | |
export TBL_ZSH_JST='' | |
[[ $(jobs -l | wc -l) -gt 0 ]] && export TBL_ZSH_JST=' ⚙' | |
} | |
if [[ $EUID -eq 0 ]]; then | |
# Root Prompt | |
_USERCOLOR="%{$fg_bold[red]%}" | |
else | |
# User Prompt | |
_USERCOLOR="%{$fg[green]%}" | |
fi | |
PROMPT=$' ${(r:$(($COLUMNS - 8))::\u2500:)} %D{%H:%M}\n${w}[${_USERCOLOR}%n${w}@%m %{$fg[cyan]%}%c$(git_prompt_info)${w}]%(!.#.$) ' | |
RPROMPT='%{$fg_bold[magenta]%}%(?.. [%?])%{$fg_bold[cyan]%}${TBL_ZSH_JST}%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="${w}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment