>_
typewritten - a minimal, informative zsh prompt theme
Leaves all the room for what's important.
Terminal is iTerm2 — Font is FiraCode — Terminal theme is SpaceCamp
Features
- Prompt layout customization
- Prompt symbol customization
- Cursor customization
- Current directory
- Current git branch
- Git status indicators:
?
— untracked change(s);+
— staged change(s);!
— file(s) modified in the repo;»
— renamed file(s);—
— deleted file(s);$
— stashed change(s);#
— unmerged change(s);•|
— behind of remote branch;|•
— ahead of remote branch;
- Prompt color changes to red when an error return code is
returned and code is displayed on the right - Prompt cursor fix when exiting vim
Installation
Clone the repository into your custom oh-my-zsh themes directory:
$ git clone https://github.com/reobin/typewritten.git $ZSH_CUSTOM/themes/typewritten
Symlink typewritten.zsh-theme
to your oh-my-zsh custom themes directory:
ln -s "$ZSH_CUSTOM/themes/typewritten/typewritten.zsh-theme" "$ZSH_CUSTOM/themes/typewritten.zsh-theme"
Set ZSH_THEME="typewritten"
in your .zshrc
.
Customization options
Prompt layout
3 prompt layouts are available.
To customize the prompt layout, add define the TYPEWRITTEN_PROMPT_LAYOUT
variable in your .zshrc
to one of following values : singleline
, multiline
, or singleline_verbose
.
singleline (default)
>
multiline
user@host
>
singleline verbose
user@host >
Prompt symbol
Default prompt symbol is >
. It is entirely customizable with the TYPEWRITTEN_SYMBOL
zsh variable. For example, one could set the symbol as $
by adding the following line to .zshrc
:
export TYPEWRITTEN_SYMBOL="$"
Cursor
Default cursor is underscore
, but there is two more options: beam
and block
.
They are both configured by adding the TYPEWRITTEN_CURSOR
zsh variable to your .zshrc
:
export TYPEWRITTEN_CURSOR="beam"
Right prompt prefix
By default, there is no prefix. Right prompt is made of the current directory and it's git repo info.
A prefix can be added with the TYPEWRITTEN_RIGHT_PROMPT_PREFIX
option.
For example, by using:
export TYPEWRITTEN_RIGHT_PROMPT_PREFIX="# "
My right prompt:
> ls directory -> master (git info)
Would turn into:
> ls # directory -> master (git info)