liquidprompt
Installs and activates liquidprompt, a prompt that shows what is true right now and stays quiet about the rest - a battery reading only when you are on battery, a git branch only inside a repository, a load average only when the machine is busy.
Enable it
PLUGINS=( https://github.com/jakubro/profile.d-liquidprompt)profile.d-install\. ~/.bashrcWhat it does
At install time it clones liquidprompt into ~/.liquidprompt from its stable branch, or git pulls it if the
directory is already there. It tracks stable rather than the default branch, so updates are releases.
In every interactive shell it sources ~/.liquidprompt/liquidprompt, which takes over PS1. Nothing happens in a
non-interactive shell.
Using it
There is nothing to run. The prompt replaces itself and adapts to context - it shortens the path when the path is long, marks a directory you cannot write to, shows the exit code of a command that failed, and adds a git branch and dirty marker inside a repository.
Two commands are worth knowing:
$ prompt_off # back to the plain prompt, this shell only$ prompt_on # and back againConfiguring it
liquidprompt reads ~/.liquidpromptrc, which this plugin does not ship - without one you get liquidprompt's own
defaults, which show more than most people want. Create it to turn features off and set colours:
LP_ENABLE_LOAD=0LP_ENABLE_BATT=0LP_ENABLE_TIME=1LP_ENABLE_SHORTEN_PATH=1LP_PATH_LENGTH=15Every variable is listed in liquidprompt's own configuration reference. A file you write there is yours - profile.d neither creates nor overwrites it - so it is worth keeping in a plugin of your own alongside your other dotfiles. See writing a plugin.
Requirements
None beyond bash and git. Individual prompt features read from tools that may not be present - battery, sensors,
version-control binaries - and each is simply omitted when its source is missing.