/
Installing powerline

Installing powerline

Install powerline:

sudo pip install git+git://github.com/Lokaltog/powerline

Then add the following to ~/.bashrc

if [ -f `which powerline-daemon` ]; then
  powerline-daemon -q
  POWERLINE_BASH_CONTINUATION=1
  POWERLINE_BASH_SELECT=1
  . /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh
fi


Config

The config files are located at /usr/local/lib/python2.7/dist-packages/powerline/config_files.

First start by overriding the theme, as follows:

mkdir -p ~/.config/powerline
cat <<-'EOF' > ~/.config/powerline/config.json
{
    "ext": {
        "shell": {
            "theme": "default_leftonly"
        }
    }
}
EOF
powerline-daemon --replace 

A new theme can be made by editing a config file under "themes", copying from an existing theme.

To show git branch status with colors add the following to the theme:

{
  "function": "powerline.segments.common.vcs.branch",
  "priority": 40,
  "args": {
   "status_colors": true,
   "ignore_statuses": ["U"]
  }
},