[How To] Add Powerline In KDE Konsole With Slackware64-Current
It’s been a long time i not create post for tutorial, this time i’ll share a tutorial “How To Add Powerline In Slackware Linux” and for my documentation too.
Before to steps, what is powerline???
Quoted from https://github.com/powerline/powerline. “Po__werline is statusline and f__or several other applications, including zsh, bash, tmux, IPython, Awesome, i3 and Qtile”.
Here Screenshot:
For Manual Installation:
$ git clone git://github.com/powerline/powerline
If want install powerline using pip:
$ pip install –user git+git://github.com/powerline/powerline
This tutorial i’ll use pip for powerline installation. So after install using pip, type this command for install font and config:
$ wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
$ wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
Then put or move this font to /usr/share/fonts/OTF or /usr/local/share/fonts/
# mv PowerlineSymbols.otf /usr/share/fonts/OTF
Then update your system fonts as follow:
# fc-cache -v /usr/share/fonts/OTF
After update, now install fontconfig as follows
# mv 10-powerline-symbols.conf /etc/fonts/conf.d/
Still Continue
If you use other linux besides slackware like ubuntu, debian you just add code will discuss in below to ~.bashrc (home directory).
Because slackware default not provide .bashrc or .bash_profile etc. So i must create .bashrc in home directory, with this command:
$ touch .bashrc
Then edit .bashrc as follow:
$ nano .bashrc
And here this code as follow
source /etc/profile
PATH=$PATH:~/binexport TERM=”screen-256color”
export PATH=”$HOME/.local/bin:$PATH”
export POWERLINE_COMMAND=powerline
export POWERLINE_CONFIG_COMMAND=powerline-config
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1. ~/.local/lib64/python2.7/site-packages/powerline/bindings/bash/powerline.sh
note: Function source /etc/profile for call identity profile to bash command or konsole, this code for user only not wide system like root or group.
And close your konsole (i’m running DE with KDE Plasma) or terminal, and open again. Now you’ll see this new inteface with powerline in bash.
here screenshot:
Enable Powerline For Vim
For enable powerline to vim editor, in slackware must copy file vim from /usr/share/vim as follows:
$ cp /usr/share/vim/vim74/vimrc_example.vim /home/(user)/.vimrc
note: if you can find vim74, type ls for show all file on vim directory. vim74 is version of vim editor.
Then edit .vimrc as follows:
$ nano .vimrc
And add this line to .vimrc like here:
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
set laststatus=2
set t_Co=256
And now test your vim with type command in konsole or terminal:
$ vim
It must show like this screenshot:
Summary
Powerline can show your terminal or konsole to colorful and beautiful, this tutorial i use bash shell not zsh, csh etc. This tutorial for slackware user, if you use distro beside slackware will different.
If you want install pip it’s available on https://slackbuilds.org/repository/14.1/python/pip/
Thanks,