Linux - Installation de powerline
Alasta 12 Décembre 2015 linux shell cli
Description : Nous allons installer powerline pour rendre plus agréable le prompt de vos shells.
Installation de powerline :
Powerline étant écrit en Python, il y a un minimum de packages à installer :
yum -y install python-pip python
Installation de powerline :
sudo pip install --upgrade --user --proxy=http://192.168.1.10:3124 powerline-status
sudo pip install --proxy=http://192.168.1.10:3124 argparse
note: ici avec une installation via proxyi et que pour l’utilisateur courant.
Lignes à ajouter dans .bash_profile :
export PATH=$PATH:~/.local/bin
if [ -f ~/.local/bin/powerline-daemon ]; then
~/.local/bin/powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. ~/.local/lib/python2.6/site-packages/powerline/bindings/bash/powerline.sh
fi
note : la dernière est à modifier en fonction de votre version de python.
Il suffit de se reconnecter ou de sourcer le .bash_profile.
Bonus tmux
Si vous utilisez tmux, vous pouvez ajouter cela à votre .tmux.conf
source .local/lib/python2.6/site-packages/powerline/bindings/tmux/powerline.conf
Bonus Vim
A ajouter dans votre .vimrc :
set rtp+=$HOME/.local/lib/python2.6/site-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