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 the following line to your ~/.zshrc
source ~/alien/alien.zsh
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"
export ALIEN_THEME="gruvbox"
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(){
color0=018 # time bg
color1=226 # init bg
color1r=196 # init bg error
color2=254 # time fg
color3=026 # user bg
color4=254 # user fg
color5=045 # dir bg
color6=019 # dir fg
color7=238 # vcs bg
color8=228 # prompt fg
color9=051 # vcs fg
color10=244 # lr bg
color11=255 # lr fg
color12=253 # dirty copy bg
color13=016 # dirty copy fg
color14=245 # venv color
}
Then activate the theme using:
export ALIEN_CUSTOM_THEME_PATH=/path/to/custom/theme.zsh
export ALIEN_DATE_TIME_FORMAT=%H:%M:%S # default is %r
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 MIT License.