Linux - Liquidprompt an Adaptive Prompt for Bash
The majority of time a Linux administrator will live his/her life will be in a shell prompt and liquid prompt is a nice out of the box customisation for bash.
You can install it cloning its the git repository :
tiago@HP-8470:~$ sudo apt install git
tiago@HP-8470:~$ git clone --branch stable https://github.com/nojhan/liquidprompt.git ~/liquidprompt
After installed we need to edit our bash profile and add a few lines to it:
tiago@HP-8470:~ $ vim ~/.bashrc
Let's finally source the file :
tiago@HP-8470:~ $ source ~/.bashrc
And, we now have a different prompt as seen below :
Before we finish, let's activate powerline
which is a shipped theme :
[tiago@HP-8470:~] $ source ~/liquidprompt/themes/powerline/powerline.theme
And we can now use the lp_theme
command to change our theme :
To have it changed permanently we need to add the below onto our ~/.bashrc
below the line we have previously added :
[[ $- = *i* ]] && source ~/liquidprompt/themes/powerline/powerline.theme
[[ $- = *i* ]] && lp_theme powerline
Liquidprompt has a lot of options and checking their documentation is the way to personalise your prompt.