- Ubuntu 15.04 desktop
- Gnome-terminal
- Bash
- https://github.com/milkbikis/powerline-shell
- https://powerline.readthedocs.org/en/latest/installation/linux.html#fontconfig
(1) In terminal, install powerline-shell script and font:
$ cd ~
$ mkdir tmp # if not exists
$ mkdir bin # if not exists
$ cd tmp
$ git clone https://github.com/milkbikis/powerline-shell
$ ./install.py
$ mv powerline-shell.py ~/bin
$ ln -s ~/bin/powerline-shell.py ~/powerline-shell.py
$ wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
$ wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
$ mv PowerlineSymbols.otf ~/.fonts/
$ fc-cache -vf ~/.fonts/
$ mkdir -p ~/.config/fontconfig/conf.d/
$ mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
(2) With a text editor, open ~/.bashrc
and add the following lines:
function _update_ps1() {
export PS1="$(~/powerline-shell.py $? 2> /dev/null)"
}
export PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
(3) Log out and log in.