sudo dnf install powerline
Configure your shell to use the powerline daemon.
Add this to your
if [ -f `which powerline-daemon` ]; then powerline-daemon -q POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1 . /usr/share/powerline/bash/powerline.sh fi
add this to
set fish_function_path $fish_function_path "/usr/share/powerline/fish" powerline-setup
Configure powerline to display git information
If all you want to do is get the git branch displayed on your powerline, that’s pretty easy, see for example this excellent article. But after I discovered powerline-gitstatus, I just had to have it.
Install the powerline-gitstatus segment:
pip install powerline-gitstatus
Setup a configuration
I’ve put my powerline configuration up on github, so if you like, you can start with my configuration, and play with it from there simply by clone my powerline-configuration repository into your local .config directory. I.e.:
cd ~/.config git clone https://github.com/spacemoose/powerline_cofiguration.git powerline
Otherwise you can copy over the default configuration and follow the directions here.
Try out your new configuration
Since this article is focused on customizing our shell prompt, we are dealing with the powerline daemon, which means we must run
when we want to see what effect our changes might have â€“ BUT before you do that, I highly recommend running
powerline-lint in case you forgot a comma somewhere.