安装powerline需要pip
链接:https://pan.baidu.com/s/1Jc59VD35PYic2fTK5v8h1w 密码:otfp
pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
利用pip安装powerline
powerline
pip install powerline-status
测试
pip show powerline-status
安装字体
下载
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
安装
cp PowerlineSymbols.otf /usr/share/fonts
执行命令刷新加入字体
fc-cache -vf /usr/share/fonts/
(如果没有fc-cache则需安装fontconfig) cp 10-powerline-symbols.conf /etc/fonts/conf.d/
配置bash
vim ~/.bashrc
#powerline
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
export TERM="screen-256color"
source ~/.bashrc
效果
配置vim
vim ~/.vimrc
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim
set laststatus=2
set t_Co=256
source ~/.vimrc
效果
骚起来吧。