Skip to content

Instantly share code, notes, and snippets.

@dariodiaz
Forked from tos-kamiya/powerline-shell-install.md
Created September 10, 2015 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariodiaz/95649b2343de38d94230 to your computer and use it in GitHub Desktop.
Save dariodiaz/95649b2343de38d94230 to your computer and use it in GitHub Desktop.
Config: Powerline-shell install

Environment (I tried)

  • Ubuntu 15.04 desktop
  • Gnome-terminal
  • Bash

Reference

Instruction

(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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment