alien theme is faster than a lot other themes. Why? It updates part of the prompt asyncronously - the time consuming processings like git status checking, git dirty copy checking etc. How? It starts a background job for these process, and in the mean time draws initial prompt and lets you use the terminal as you would normally.
alien theme is independent of any library like Oh-My-Zsh or Prezto. Whatever it needs already included inside. The only exception is font. You need to install the powerline patched fonts to properly display the prompt.
- zsh (obviously)
- powerline patched fonts see here
Add the following line to your .zshrc depending on your zsh plugin manager
antigen theme eendroroy/alien alien
zgen:
zgen load eendroroy/alien
zplug "eendroroy/alien"
git clone https://github.com/eendroroy/alien.git
cd alien
git submodule update --init --recursive
add all configurations before plugin definitions
you can chose from 3 different color schemes (blue is the default)
in ~/.zshrc just add any from the following three lines before your 'antigen theme ...' line
export ALIEN_THEME="blue"
export ALIEN_THEME="green"
export ALIEN_THEME="red"
export ALIEN_THEME="soft"
Custom Color
color0=018 # time background color
color1=226 # normal background color
color1r=196 # normal error background color
color2=254 # time foreground color
color3=026 # user background color
color4=254 # user foreground color
color5=045 # dir background color
color6=019 # dir foreground color
color7=238 # vcs background color
color8=228 # prompt foreground color
color9=051 # vcs foreground color
color10=244 # git left-right background color
color11=255 # git left-right foreground color
color12=253 # dirty copy background color
color13=016 # dirty copy foreground color
color14=245 # venv color
Or creating a new theme file:
/path/to/custom/theme.zsh
#!/usr/bin/env zsh
alien_theme(){
[[ -z $color0 ]] && color0=018 # time bg
[[ -z $color1 ]] && color1=226 # init bg
[[ -z $color1r ]] && color1r=196 # init bg error
[[ -z $color2 ]] && color2=254 # time fg
[[ -z $color3 ]] && color3=026 # user bg
[[ -z $color4 ]] && color4=254 # user fg
[[ -z $color5 ]] && color5=045 # dir bg
[[ -z $color6 ]] && color6=019 # dir fg
[[ -z $color7 ]] && color7=238 # vcs bg
[[ -z $color8 ]] && color8=228 # prompt fg
[[ -z $color9 ]] && color9=051 # vcs fg
[[ -z $color10 ]] && color10=244 # lr bg
[[ -z $color11 ]] && color11=255 # lr fg
[[ -z $color12 ]] && color12=253 # dirty copy bg
[[ -z $color13 ]] && color13=016 # dirty copy fg
[[ -z $color14 ]] && color14=245 # venv color
}
Then activate the theme using:
export ALIEN_CUSTOM_THEME_PATH=/path/to/custom/theme.zsh
Enable Nerd Font
export USE_NERD_FONT=1
Note: Nerd fonts
export ALIEN_GIT_SYM=G
export ALIEN_HG_SYM=H
export ALIEN_SVN_SYM=S
export ALIEN_BRANCH_SYM=
# Symbols from promptlib
export PLIB_GIT_ADD_SYM=+
export PLIB_GIT_DEL_SYM=-
export PLIB_GIT_MOD_SYM=⭑
export PLIB_GIT_NEW_SYM=?
export PLIB_GIT_PUSH_SYM=↑
export PLIB_GIT_PULL_SYM=↓
Note: this overrides USE_NERD_FONT
configuration.
export PLIB_GIT_TRACKED_COLOR=green
export PLIB_GIT_UNTRACKED_COLOR=red
- indrajit - Owner - eendroroy
The project is available as open source under the terms of the GPL-3.0 License.