[zsh] consolidates theme into zshrc

This commit is contained in:
Josh Sherman 2017-01-23 17:59:42 -06:00
parent 422ed71aa2
commit 4ab2b26363
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
2 changed files with 23 additions and 26 deletions

View file

@ -1,23 +0,0 @@
#!/bin/zsh
function username() {
if [[ `whoami` != 'josh' ]]; then
echo %{$FG[248]%}%n
fi
}
function server() {
if [[ `hostname` != josh-* ]]; then
echo "%{$FG[244]%}@%{$fg[magenta]%}%m "
fi
}
PROMPT_USER="$(username)$(server)"
PROMPT='
%{$PROMPT_USER%}%{$fg[blue]%}%~ $(git_prompt_info)
%{$FG[244]%}%# %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN=""

View file

@ -15,12 +15,9 @@ source $DOTFILES/zsh/`uname`.zshrc
source $DOTFILES/vendor/zsh-users/antigen/antigen.zsh
antigen-use oh-my-zsh
antigen-theme $DOTFILES/zsh joshtronic
antigen-bundle zsh-users/zsh-completions
antigen-bundle zsh-users/zsh-syntax-highlighting
antigen-bundle zsh-users/zsh-history-substring-search
antigen-apply
bindkey '^[[A' history-substring-search-up
@ -102,3 +99,26 @@ ssh() {
command ssh "$@"
fi
}
function username() {
if [[ `whoami` != 'josh' ]]; then
echo %{$FG[248]%}%n
fi
}
function server() {
if [[ `hostname` != josh-* ]]; then
echo "%{$FG[244]%}@%{$fg[magenta]%}%m "
fi
}
PROMPT_USER="$(username)$(server)"
PROMPT='
%{$PROMPT_USER%}%{$fg[blue]%}%~ $(git_prompt_info)
%{$FG[244]%}%# %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN=""