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`

https://forum.manjaro.org/t/environment-variables-set-through-systemd-user-configuration-ignored/48247/6

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

https://superuser.com/questions/992210/how-to-set-environment-variables-for-a-gnome-wayland-session
This worked for me except that my python version folder was python3.8 instead of python3.7