Utilities

Excellent Utilities: Liquid Prompt – adaptive prompt for Bash & Zsh

Last Updated on May 22, 2022

In Operation

The best way to illustrate the benefits of Liquid Prompt is with a few examples, captured in the image below. I’ll describe the significance of the additional symbols you see below, line by line.

liquidprompt

Starting with the top line, you see a wiggly yellow icon. This indicates the battery status; my laptop is discharging but above the given threshold (the default threshold is 75%). You’ll note in the final line, the symbol has changed to red, indicating the battery status is below 75%. There’s battery symbols if the battery is charging above the given threshold but not fully charged, and if the battery is charging and below the given threshold.

The first command “finger” changes the prompt to include a magenta 127. This is Liquid Prompt reporting an error message. 127 is returned by the shell when the given command is not found in your PATH system variable, and it’s not a built-in shell command. It can also be output when a library required by the command is not found.

In the second command, I’ve changed directory from my home directory to /usr/bin/. You’ll note the green colon has changed to a red colon. The green colon indicates I have write permission to my home directory (which you’d expect), the red colon tells me that I don’t have write permission to /usr/bin/.

In the next command, I change directory to ~/liquidprompt/. This is a version control repository with the plus/minus symbol indicating it’s a Git repository. The prompt now contains the word master in green. The master indicates the name of the current branch, the green tells me everything is up-to-date. If the text was red, there are changes, and if yellow, there are pending commits to push. There’s lots of other reporting such as telling you the number of commits you’re behind the remote. There’s support for other version control repositories: Mercurial, Subversion, Bazaar, and Fossil.

In that directory, I then read the file README.md with the less command. After exiting the file, the prompt tells me the amount of time I spent reading that file. 14 seconds.

I change back to my home directory, and fire up emacs. I suspend the process; the prompt then includes 1z. A helpful reminder there’s a process suspended in the background.

The examples only scratch the surface of what Liquid Prompt is capable of displaying.  For a complete list, please read the liquidpromptrc file, which has clear documentation about all the tool’s capabilities. But I’d add there’s support for theming and custom colors for different elements of the prompt.

Next page: Page 3 – Summary

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary


Complete list of articles in this series:

Excellent Utilities
AES CryptEncrypt files using the Advanced Encryption Standard
AnanicyShell daemon created to manage processes’ IO and CPU priorities
brootNext gen tree explorer and customizable launcher
CerebroFast application launcher
cheat.shCommunity driven unified cheat sheet
CopyQAdvanced clipboard manager
crocSecurely transfer files and folders from the command-line
DeskreenLive streaming your desktop to a web browser
dufDisk usage utility with more polished presentation than the classic df
ezaA turbo-charged alternative to the venerable ls command
Extension ManagerBrowse, install and manage GNOME Shell Extensions
fdWonderful alternative to the venerable find
fkillKill processes quick and easy
fontpreviewQuickly search and preview fonts
horcruxFile splitter with encryption and redundancy
KoohaSimple screen recorder
KOReaderDocument viewer for a wide variety of file formats
ImagineA simple yet effective image optimization tool
LanguageToolStyle and grammar checker for 30+ languages
Liquid PromptAdaptive prompt for Bash & Zsh
lnavAdvanced log file viewer for the small-scale; great for troubleshooting
lsdLike exa, lsd is a turbo-charged alternative to ls
Mark TextSimple and elegant Markdown editor
McFlyNavigate through your bash shell history
mdlessFormatted and highlighted view of Markdown files
naviInteractive cheatsheet tool
notiMonitors a command or process and triggers a notification
NushellFlexible cross-platform shell with a modern feel
nvitopGPU process management for NVIDIA graphics cards
OCRmyPDFAdd OCR text layer to scanned PDFs
Oh My ZshFramework to manage your Zsh configuration
PaperworkDesigned to simplify the management of your paperwork
pastelGenerate, analyze, convert and manipulate colors
PDF Mix ToolPerform common editing operations on PDF files
pecoSimple interactive filtering tool that's remarkably useful
ripgrepRecursively search directories for a regex pattern
RnoteSketch and take handwritten notes
scrcpyDisplay and control Android devices
StickySimulates the traditional “sticky note” style stationery on your desktop
tldrSimplified and community-driven man pages
tmuxA terminal multiplexer that offers a massive boost to your workflow
TuskAn unofficial Evernote client with bags of potential
UlauncherSublime application launcher
WatsonTrack the time spent on projects
Whoogle SearchSelf-hosted and privacy-focused metasearch engine
ZellijTerminal workspace with batteries included
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments