Bullet Train is a oh-my-zsh shell theme based on the Powerline Vim plugin. It aims for simplicity, showing information only when it's relevant.
It currently shows:
- Current Python virtualenv; when using Pyenv and no active virtualenv shows the current Python version the shell uses
- Current Ruby version using chruby; version and gemset when on RVM or Rbenv
- Current Node.js version, through NVM (if present) or Node.js
- Current Perl version using plenv
- Git status
- Timestamp
- Current directory
- Background jobs
- Exit code of last command
If you want add some new feature, of fix some bug, open an issue and lets hack together.
For a tmux theme to work with it, I suggest Maglev.
In order to use the theme, you will first need:
- Powerline compatible fonts like Vim Powerline patched fonts, Input Mono or Monoid.
- On Ubuntu like systems you'll need the
ttf-ancient-fonts
package to correctly display some unicode symbols that are not covered by the Powerline fonts above. - A ZSH framework like antigen, oh-my-zsh or zgen
- Make sure terminal is using 256-colors mode with
export TERM="xterm-256color"
- For iTerm 2 users, make sure you go into your settings and set both the regular font and the non-ascii font to powerline compatible fonts or the prompt separators and special characters will not display correctly.
-
Download the theme here
-
Put the file bullet-train.zsh-theme in $ZSH_CUSTOM/themes/
-
Configure the theme in your ~/.zshrc file:
ZSH_THEME="bullet-train"
Add the following snippet to your .zshrc somewhere after the line
antigen use oh-my-zsh
.
antigen theme https://github.com/caiogondim/bullet-train-oh-my-zsh-theme bullet-train
If you're using zgen, add the following line to your ~/.zshrc where you're adding your other zsh plugins after the line zgen oh-my-zsh
.
zgen load caiogondim/bullet-train-oh-my-zsh-theme bullet-train
If you're using zplug, add the following line
to your ~/.zshrc where you're adding your other zsh plugins after the
line zplug "robbyrussell/oh-my-zsh"
.
setopt prompt_subst # Make sure propt is able to be generated properly.
zplug "adambiggs/zsh-theme", use:adambiggs.zsh-theme
Bullet Train is configurable. You can change colors and which segments you want or don't want to see. All options must be overridden in your .zshrc file.
BULLETTRAIN_PROMPT_ORDER
defines order of prompt segments. Use zsh array
syntax to specify your own order, e.g:
BULLETTRAIN_PROMPT_ORDER=(
git
context
dir
time
)
NOTE: You do not need to specify end segment - it will be added automatically. With this you can also specify custom segments, please see Tips for more details.
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_PROMPT_CHAR |
\$ |
Character to be show before any command |
BULLETTRAIN_PROMPT_ROOT |
true |
Highlight if running as root |
BULLETTRAIN_PROMPT_SEPARATE_LINE |
true |
Make the prompt span across two lines |
BULLETTRAIN_PROMPT_ADD_NEWLINE |
true |
Adds a newline character before each prompt line |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_STATUS_SHOW |
true |
Show/hide that segment |
BULLETTRAIN_STATUS_EXIT_SHOW |
false |
Show/hide exit code of last command |
BULLETTRAIN_STATUS_BG |
green |
Background color |
BULLETTRAIN_STATUS_ERROR_BG |
red |
Background color of segment when last command exited with an error |
BULLETTRAIN_STATUS_FG |
black |
Foreground color |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_TIME_SHOW |
true |
Show/hide that segment |
BULLETTRAIN_TIME_12HR |
false |
Format time using 12-hour clock (am/pm) |
BULLETTRAIN_TIME_BG |
'' |
Background color |
BULLETTRAIN_TIME_FG |
'' |
Foreground color |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_CUSTOM_MSG |
false |
Free segment you can put a custom message |
BULLETTRAIN_CUSTOM_BG |
black |
Background color |
BULLETTRAIN_CUSTOM_FG |
black |
Foreground color |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_CONTEXT_SHOW |
false |
Show/hide that segment |
BULLETTRAIN_CONTEXT_BG |
black |
Background color |
BULLETTRAIN_CONTEXT_FG |
default |
Foreground color |
BULLETTRAIN_CONTEXT_DEFAULT_USER |
none | Default user. If you are running with other user other than default, the segment will be showed. |
BULLETTRAIN_CONTEXT_HOSTNAME |
%m |
Hostname. Set %M to display the full qualified domain name. |
BULLETTRAIN_IS_SSH_CLIENT |
none | If true , the segment will be showed. |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_VIRTUALENV_SHOW |
true |
Show/hide that segment |
BULLETTRAIN_VIRTUALENV_BG |
yellow |
Background color |
BULLETTRAIN_VIRTUALENV_FG |
white |
Foreground color |
BULLETTRAIN_VIRTUALENV_PREFIX |
đ |
Prefix of the segment |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_NVM_SHOW |
false |
Show/hide that segment |
BULLETTRAIN_NVM_BG |
green |
Background color |
BULLETTRAIN_NVM_FG |
white |
Foreground color |
BULLETTRAIN_NVM_PREFIX |
"⏥ " |
Prefix of the segment |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_RUBY_SHOW |
true |
Show/hide that segment |
BULLETTRAIN_RUBY_BG |
magenta |
Background color |
BULLETTRAIN_RUBY_FG |
white |
Foreground color |
BULLETTRAIN_RUBY_PREFIX |
"âŠ" |
Prefix of the segment |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_GO_SHOW |
false |
Show/hide that segment |
BULLETTRAIN_GO_BG |
green |
Background color |
BULLETTRAIN_GO_FG |
white |
Foreground color |
BULLETTRAIN_GO_PREFIX |
go |
Prefix of the segment |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_PERL_SHOW |
false |
Show/hide that segment |
BULLETTRAIN_PERL_BG |
yellow |
Background color |
BULLETTRAIN_PERL_FG |
black |
Foreground color |
BULLETTRAIN_PERL_PREFIX |
đȘ |
Prefix of the segment |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_DIR_SHOW |
true |
Show/hide that segment |
BULLETTRAIN_DIR_BG |
blue |
Background color |
BULLETTRAIN_DIR_FG |
white |
Foreground color |
BULLETTRAIN_DIR_CONTEXT_SHOW |
false |
Show user and machine in an SCP formatted style |
BULLETTRAIN_DIR_EXTENDED |
1 |
Extended path (0=short path, 1=medium path, 2=complete path, everything else=medium path) |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_GIT_SHOW |
true |
Show/hide that segment |
BULLETTRAIN_GIT_COLORIZE_DIRTY |
false |
Set BULLETTRAIN_GIT_BG to BULLETTRAIN_GIT_COLORIZE_DIRTY_COLOR in dirty state |
BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR |
yellow |
BULLETTRAIN_GIT_BG in dirty state |
BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR |
black |
BULLETTRAIN_GIT_FG in dirty state |
BULLETTRAIN_GIT_BG |
white |
Background color |
BULLETTRAIN_GIT_FG |
black |
Foreground color |
BULLETTRAIN_GIT_PROMPT_CMD |
git_prompt_info |
Function to display details about your git segment. |
BULLETTRAIN_GIT_EXTENDED |
true |
|
BULLETTRAIN_GIT_PREFIX |
"î " |
Prefix |
BULLETTRAIN_GIT_SUFFIX |
"" |
Suffix |
BULLETTRAIN_GIT_DIRTY |
"â" |
Icon for dirty state |
BULLETTRAIN_GIT_CLEAN |
"â" |
Icon for clean state |
BULLETTRAIN_GIT_ADDED |
"%F{green}â%F{black}" |
Icon for added files on stage |
BULLETTRAIN_GIT_MODIFIED |
"%F{blue}âč%F{black}" |
Icon for modified files |
BULLETTRAIN_GIT_DELETED |
"%F{red}â%F{black}" |
Icon for delete files on stage |
BULLETTRAIN_GIT_UNTRACKED |
"%F{yellow}â%F{black}" |
Icon for untracked files |
BULLETTRAIN_GIT_RENAMED |
"â" |
Icon for renamed |
BULLETTRAIN_GIT_UNMERGED |
"â" |
Icon for unmerged state |
BULLETTRAIN_GIT_AHEAD |
" âŹ" |
Icon for ahead state from remote |
BULLETTRAIN_GIT_BEHIND |
" âŹ" |
Icon for behind state from remote |
BULLETTRAIN_GIT_DIVERGED |
" âŹ" |
Icon for diverged state from remote |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_HG_SHOW |
true |
Show/hide that segment |
Variable | Default | Meaning |
---|---|---|
BULLETTRAIN_EXEC_TIME_SHOW |
false |
Show/hide that segment |
BULLETTRAIN_EXEC_TIME_ELAPSED |
5 | Elapsed time of command execution |
BULLETTRAIN_EXEC_TIME_BG |
yellow |
Background color |
BULLETTRAIN_EXEC_TIME_FG |
black |
Foreground color |
That project was originally a fork from
Powerline, but
most of the code was later erased and its now more closely related to
Agnoster. Below is a git summary
of the project:
144 Caio Gondim
33 Jérémy Romey
14 Greg Fitzgerald
8 Viktor (Icon) VAD
8 Dan Kaplun
7 Jocelyn Mallon
6 Jérémy Romey
6 Joe Block
5 Arthur Wang
5 Dawid Kurek
4 Flavius Aspra
3 Michael Robinson
3 Mario Zigliotto
3 Michael Cornell
2 Jiri Tyr
2 Charlie Smith
2 wujtruj
2 itsZero (Chien-An Cho)
1 alysson
1 gvillalta99
1 illuminatis
1 krischer
1 m.kuehn
1 timfeirg
1 Adrien Brault
1 yachi
1 Andreas Galauner
1 Dale Davis
1 Fabio Poloni
1 Guillaume BINET
1 Hannes Frank
1 Heng-Yi Wu
1 Jack Chu
1 Jason Hollis
1 KVoll
1 Kevin
1 Manuel Hoffmann
1 Marius KrÀmer
1 Maxime Bruguet
1 Mertcan Mermerkaya
1 Nicholas
1 Peter Nagy
1 SĂ©bastien Bordenave
This theme is highly inspired by the following themes:
If you found this project useful and are willing to donate, transfer some
bitcoins to 1BqqKiZA8Tq43CdukdBEwCdDD42jxuX9UY
or through the
URL https://www.coinbase.com/caiogondim