How to setup powerline


Install Powerline as user on Clearlinux

pip --user install powerline-status

copy config files to user .config

mkdir -p ~/.config/powerline

cp -a ~/.local/lib/python3.7/site-packages/powerline/config_files/* ~/.config/powerline/

create daemon

mkdir ~/.config/systemd/user/

cat << EOF > ~/.config/systemd/user/powerline.service

#powerline service
[Unit]
Description=powerline user service

[Service]
Type=oneshot
ExecStart=/home/${USER}/.local/bin/powerline-daemon -q

set .local/bin in path of user systemd


echo "PATH=$PATH:~/.local/bin" > ~/.config/environment.d/path.conf

#to update environment without logging out
`systemctl --user import-environment`

NB: if you are using gnome-wayland you have to do this

echo "PATH        OVERRIDE=${HOME}/bin:${HOME}/.local/bin:${PATH}" > ~/.pam_environment`


Edit bashrc to automatically start powerline

   cat  << EOF >> ~/.bashrc

    PATH=$PATH:/home/${USER}/.local/bin

    if [ -f /home/${USER}/.local/lib/python3.7/site-packages/powerline/bindings/bash/powerline.sh ]; then
    source /home/${USER}/.local/lib/python3.7/site-packages/powerline/bindings/bash/powerline.sh
    fi
    EOF

systemctl --user enable powerline

log out then in

TODO: setup to use clears’ nice color scheme