Liquidprompt

Liquidprompt

Hello everyone! 🥸

So… I got tired of creating thousands of bash prompts all the time, losing them because I suck at making backups, and having to start all over again! So I decided to go with something that could be pretty cool out of the box.

I stumbled upon liquidprompt, a bash prompt that comes pre configured for extensive usage. It includes git branch (I have a tutorial on how to do that on bash btw, you can see it here), a cool directory shortening feature (that can also be enabled from bash for your regular bash prompts, I’m just too lazy to activate that all the time) and nice colors for exit codes and much much more. You can see all the details on their GitHub Page.

How to install liquidprompt

On their website they want you to clone the master repo, and source a file inside called liquidprompt, however since I’m using Arch Linux I can install it from the official repos (it’s on Debian repos too, so it might be packaged on your distro’s repos already, I just wanted to say that I use Arch Btw).

alt text

How to setup liquidprompt

So, in order for me to see liquidprompt every time I open a new terminal, I just have to append the following to my ~/.bashrc file:

source $(which liquidprompt)

And that’s it, this is how it looks…

Liquidprompt showcase

Powerline theme

For the powerline theme, since I installed liquidprompt with my package manager, the theme file would be located on /usr/share/liquidprompt/themes/powerline so I just need to source that and then use the lp_theme command to switch to that theme, you can add the following to your ~/.bashrc file.

source $(which liquidprompt)
source /usr/share/liquidprompt/themes/powerline/powerline.theme
lp_theme powerline

That theme looks like this…

Liquidprompt powerline theme showcase

So, that’s how I have some peace of mind leaving my bash prompt to an alternate program that I won’t be editing 2385792385723 times on a daily basis.

Thanks for reading! Blessings. 🍎


Last modified on 2024-03-12