Here is how I did to get Powerline symbols to work
In my setup I use tmux I compiled it my self and you should do the same:
Installing Tmux
- Login to your Putty or Kitty terminal
- To get and build the latest from version control - note that this requires
autoconf
,automake
andpkg-config
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make
Installing Powerline (Different config options)
- Add the Universe repository:
sudo add-apt-repository universe
sudo apt install --yes powerline
Configure tmux (Different environment)
To configure Powerline in tmux, add the following to your ~/.tmux.conf
file:
set -g default-terminal "screen-256color"
source "/usr/share/powerline/bindings/tmux/powerline.conf"
Configure Bash
To configure Powerline for bash, add the following lines to your $HOME/.bashrc
file:
# Powerline configuration
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
source /usr/share/powerline/bindings/bash/powerline.sh
fi
To apply the changes to your current terminal:
source ~/.bashrc
Edit your Powerline configuration
You can customize what segments appear in Powerline, or even the behavior of specific segments. Follow these instructions to customize your Powerline installation:
- Copy the
/usr/share/powerline/config_files/
folder to$HOME/.config/powerline
mkdir -p $HOME/.config/powerline cp -R /usr/share/powerline/config_files/* \ $HOME/.config/powerline/
- Edit the files there according to your needs. A good starting point is the
$HOME/.config/powerline/config.json
file. - Reload the Powerline daemon
powerline-daemon --replace
You can customize what powerline feature it should show
Available segments
https://powerline.readthedocs.io/en/master/configuration/segments.html
If you would like to play with Powerline in your tmux session, then you need to edit the following file:
/home/username/.config/powerline/themes/tmux
This is my default.json
{
"segments": {
"right": [
{
"function": "powerline.segments.common.sys.uptime",
"before": "Uptime: ",
"priority": 50
},
{
"function": "powerline.segments.common.net.internal_ip",
"before": "IP: ",
"args":
{
"interface": "enp0s31f6",
"ipv": "4"
},
"priority": 50
},
{
"function": "powerline.segments.common.net.network_load",
"args":
{
"interface": "enp0s31f6",
"si_prefix": "True",
"recv_format": "Down: {value:>8} ",
"sent_format": "UP: {value:>8}"
},
"priority": 50
},
{
"function": "powerline.segments.common.sys.cpu_load_percent",
"before": "CPU: ",
"args": {
"format": "{0:.0f}%"
},
"priority": 50
},
{
"function": "powerline.segments.common.time.date",
"args": {
"format": "%d-%m-%Y"
}
},
{
"function": "powerline.segments.common.time.date",
"name": "time",
"args": {
"format": "%H:%M",
"istime": true
}
},
{
"function": "powerline.segments.common.net.hostname"
}
]
}
}
Remember you also need to find a Powerline font that works with Powerline