Skip to content

Instantly share code, notes, and snippets.

@mrkara
Last active December 8, 2022 20:18
Show Gist options
  • Save mrkara/68c6435f019136acd8db93546cff22e7 to your computer and use it in GitHub Desktop.
Save mrkara/68c6435f019136acd8db93546cff22e7 to your computer and use it in GitHub Desktop.
Install Powerline on Debian 9 Stretch
  1. Install pip sudo apt-get install python-pip
  2. Install powerline sudo pip install powerline-status
  3. Install fonts sudo apt-get install fonts-powerline
  4. Add these lines to respective files:

.vimrc

set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
" Always show statusline
set laststatus=2
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
set t_Co=256

.bashrc

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

.zshrc

if [[ -r /usr/local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh ]]; then
source /usr/local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh
fi

.tmux.conf

source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
set-option -g default-terminal "screen-256color"

Credits

@diogocavilha
Copy link

That's perfect!

It has worked pretty fine for me.

Thanks ever so much.

@codemedici
Copy link

for .zshrc and .tmux.conf did you mean "../python2.7/dist-packages/.." rather than "../python2.7/site-packages/.." ?

@oroverdino
Copy link

you should install vim-nox

@pablotrianda
Copy link

pablotrianda commented Mar 24, 2018

Thanks!
Is not recommended run pip with sudo, the command must be:

pip install powerline-status --user

@kenvac
Copy link

kenvac commented Jun 3, 2019

I got following error
You need vim compiled with Python 2.6, 2.7 or 3.2 and later support

So had to recompile the vim. I thought it would be great to share it with everyone. Run the following code to compile vim with python 2.7 support.
cd /tmp && git clone https://github.com/vim/vim.git && cd vim ./configure --enable-pythoninterp --prefix=/usr make && sudo make install

Also, I changed the powerline.conf path to /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf for tmux

@collinsmarra
Copy link

You can use sudo apt-get install powerline in debian based systems and add this to your .bash_profile

if [ -f which powerline-daemon]; then powerline-daemon -q POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1 . /usr/share/powerline/integrations/powerline.sh fi

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