[zsh] consolidates theme into zshrc
This commit is contained in:
parent
422ed71aa2
commit
4ab2b26363
2 changed files with 23 additions and 26 deletions
|
@ -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=""
|
26
zsh/zshrc
26
zsh/zshrc
|
@ -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=""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue