Config Options
Almost every feature in Liquidprompt can be turned on or off using these config
options. They can either be set before sourcing Liquidprompt (in .bashrc
or
.zshrc
), or set in a Liquidprompt config file.
Note
Config variables set in a config file take precedence over variables set in the
environment or on the command line. Setting a config option on the command
line, then running lp_activate()
will overwrite that option with the
value from the config file, if it is set there.
The config file is searched for in the following locations:
~/.liquidpromptrc
$XDG_CONFIG_HOME/liquidpromptrc
- (ifXDG_CONFIG_HOME
is not set,~/.config
is used)$XDG_CONFIG_DIRS/liquidpromptrc
-XDG_CONFIG_DIRS
is a:
delimited array, each value is searched. (ifXDG_CONFIG_DIRS
is not set,/etc/xdg
is used)/etc/liquidpromptrc
The first file found is sourced.
Liquidprompt ships with an example config file, liquidpromptrc-dist
. You can
start from this file for your config:
cp ~/liquidprompt/liquidpromptrc-dist ~/.config/liquidpromptrc
In the event that you synchronize your configuration file across multiple
computers, or if you have an /etc/liquidpromptrc
system-wide from which
you’d like to make minor deviations in an individual user account, you can
augment the primary config to add in any local modifications using lines such
as these:
LOCAL_RCFILE=$HOME/.liquidpromptrc.local
[ -f "$LOCAL_RCFILE" ] && source "$LOCAL_RCFILE"
Note
The example config file does not include every config option, and the comments describing the options are less verbose than the descriptions on this page.
Each config option is documented with its default value.
Options of type bool
accept values of 1
for true and 0
for false.
General
- LP_MARK_PREFIX: string = " "
String added directly before
LP_MARK_DEFAULT
, after all other parts of the prompt. Can be used to tag the prompt in a way that is less intrusive thanLP_PS1_PREFIX
, or add a newline before the prompt mark. For example:LP_MARK_PREFIX=$'\n'
- LP_PATH_CHARACTER_KEEP: int = 3
The number of characters to save at the start and possibly the end of a directory name when shortening the path. See
LP_PATH_METHOD
for details of the specific methods.New in version 2.0.
- LP_PATH_DEFAULT: string
Deprecated since version 2.0: Use
LP_PATH_METHOD
set to “truncate_to_last_dir” instead.Used to define the string used for the path. Could be used to make use of shell path shortening features, like
%2~
in Zsh to keep the last two directories of the path.LP_ENABLE_SHORTEN_PATH
must be disabled to have any effect.
- LP_PATH_KEEP: int = 2
The number of directories (counting ‘/’) to display at the beginning of a shortened path.
Set to
1
, will display only root. Set to0
, will keep nothing from the beginning of the path.LP_ENABLE_SHORTEN_PATH
must be enabled to have any effect.See also:
LP_PATH_LENGTH
andLP_PATH_METHOD
.Changed in version 2.0: No longer supports a value of
-1
.
- LP_PATH_LENGTH: int = 35
The maximum percentage of the terminal width used to display the path before removing the center portion of the path and replacing with
LP_MARK_SHORTEN_PATH
.LP_ENABLE_SHORTEN_PATH
must be enabled to have any effect.Note
LP_PATH_KEEP
andLP_PATH_METHOD
have higher precedence over this option. Important path parts, including directories saved byLP_PATH_KEEP
,LP_PATH_VCS_ROOT
, and the last directory, will always be displayed, even if the path does not fit in the maximum length.
- LP_PATH_METHOD: string = "truncate_chars_from_path_left"
Sets the method used for shortening the path display when it exceeds the maximum length set by
LP_PATH_LENGTH
.truncate_chars_from_path_left: Truncates characters from the start of the path, showing consecutive directories as one shortened section. E.g. in a directory named
~/MyProjects/Liquidprompt/tests
, it will be shortened to...prompt/tests
. The shortened mark isLP_MARK_SHORTEN_PATH
.truncate_chars_from_dir_right: Leaves the beginning of a directory name untouched. E.g. directories will be shortened like so:
~/Doc.../Office
. How many characters will be untouched is set byLP_PATH_CHARACTER_KEEP
. The shortened mark isLP_MARK_SHORTEN_PATH
.truncate_chars_from_dir_middle: Leaves the beginning and end of a directory name untouched. E.g. in a directory named
~/MyProjects/Office
, then it will be shortened to~/MyS...cts/Office
. How many characters will be untouched is set byLP_PATH_CHARACTER_KEEP
. The shortened mark isLP_MARK_SHORTEN_PATH
.truncate_chars_to_unique_dir: Truncate each directory to the shortest unique starting portion of their name. E.g. in a folder
~/dev/liquidprompt
, it will be shortened to~/d/liquidprompt
if there is no other directory starting with ‘d’ in the home directory.truncate_to_last_dir: Only display the last directory in the path. In other words, the current directory name.
All methods (other than ‘truncate_to_last_dir’) start at the far left of the path (limited by
LP_PATH_KEEP
). Only the minimum number of directories needed to fit insideLP_PATH_LENGTH
will be shortened.LP_ENABLE_SHORTEN_PATH
must be enabled to have any effect.New in version 2.0.
- LP_PATH_VCS_ROOT: bool = 1
Display the root directory of the current VCS repository with special formatting, set by
LP_COLOR_PATH_VCS_ROOT
. IfLP_ENABLE_SHORTEN_PATH
is enabled, also prevent the path shortening from shortening or hiding the VCS root directory.New in version 2.0.
- LP_PS1_POSTFIX: string = ""
A string displayed at the very end of the prompt, after even the prompt mark.
LP_MARK_PREFIX
is an alternative that goes before the prompt mark.
- LP_PS1_PREFIX: string = ""
A string displayed at the start of the prompt. Can also be set with
prompt_tag()
.
- LP_TIME_FORMAT: string = "%H:%M:%S"
The formatting string passed to date(1) using formatting from strftime(3) used to display the current date and/or time.
See also:
LP_ENABLE_TIME
.New in version 2.1.
Features
- LP_DELIMITER_KUBECONTEXT_PREFIX: string = ""
Delimiter to shorten the Kubernetes context by removing a prefix.
Usage example:
if your context names are cluster-dev and cluster-test, then set this to “-” in order to output “dev” and “test” in prompt.
if using AWS EKS then set this to ‘/’ to show only the cluster name, without the rest of the ARN (arn:aws:eks:$AWS_REGION:$ACCOUNT_ID:cluster/$CLUSTER_NAME)
alternatively, if using AWS EKS, set this to ‘:’ to show only “cluster/$CLUSTER_NAME”. (Note: the prefix removed is a greedy match - it contains all the “:”s in the input.)
If set to the empty string no truncating will occur (this is the default).
See also:
LP_ENABLE_KUBECONTEXT
,LP_DELIMITER_KUBECONTEXT_SUFFIX
,LP_COLOR_KUBECONTEXT
, andLP_MARK_KUBECONTEXT
.New in version 2.1.
- LP_DELIMITER_KUBECONTEXT_SUFFIX: string = ""
Delimiter to shorten the Kubernetes context by removing a suffix.
Usage example:
if your context names are dev-cluster and test-cluster, then set this to “-” in order to output “dev” and “test” in prompt.
if your context names are dev.k8s.example.com and test.k8s.example.com, then set this to “.” in order to output “dev” and “test” in prompt. (Note: the suffix removed is a greedy match - it contains all the “.”s in the input.)
if using OpenShift then set this to “/” to show only the project name without the cluster and user parts.
If set to the empty string no truncating will occur (this is the default).
See also:
LP_ENABLE_KUBECONTEXT
,LP_DELIMITER_KUBECONTEXT_PREFIX
,LP_COLOR_KUBECONTEXT
, andLP_MARK_KUBECONTEXT
.New in version 2.1.
- LP_DISABLED_VCS_PATH: string = ""
Deprecated since version 2.0: Use
LP_DISABLED_VCS_PATHS
instead.An colon (
:
) separated list of absolute directory paths where VCS features will be disabled. SeeLP_DISABLED_VCS_PATHS
for more information.
- LP_DISABLED_VCS_PATHS: array<string> = ()
An array of absolute directory paths where VCS features will be disabled. Generally this would be used for repositories that are large and slow, where generating VCS information for the prompt would impact prompt responsiveness.
Any subdirectory under the input directory is also disabled, so setting “/repos” would disable VCS display when the current directory is “/repos/a-repo”. Setting
("/")
would disable VCS display completely.An example value would be:
LP_DISABLED_VCS_PATHS=("/a/svn/repo" "/home/me/my/large/repo")
See also:
LP_MARK_DISABLED
.New in version 2.0.
- LP_ENABLE_AWS_PROFILE: bool = 1
Display the current value of
AWS_PROFILE
,AWS_DEFAULT_PROFILE
, orAWS_VAULT
. AWS_PROFILE and AWS_DEFAULT_PROFILE are used to switch between configuration profiles by the AWS CLI. AWS_VAULT is used by aws-vault to specify the AWS profile in use.See also:
LP_COLOR_AWS_PROFILE
.New in version 2.1.
- LP_ENABLE_BATT: bool = 1
Display the status of the battery, if there is one, using color and marks. Add battery percentage colored with
LP_COLORMAP
ifLP_PERCENTS_ALWAYS
is enabled.Will be disabled if
acpi
is not found on Linux, fails to read the Linux sysfs system, orpmset
is not found on MacOS.See also:
LP_BATTERY_THRESHOLD
,LP_MARK_BATTERY
,LP_MARK_ADAPTER
,LP_COLOR_CHARGING_ABOVE
,LP_COLOR_CHARGING_UNDER
,LP_COLOR_DISCHARGING_ABOVE
, andLP_COLOR_DISCHARGING_UNDER
.
- LP_ENABLE_BZR: bool = 1
Display VCS information inside Bazaar repositories.
Will be disabled if
bzr
is not found.See also:
LP_MARK_BZR
.
- LP_ENABLE_COLOR: bool = 1
Use terminal formatting when displaying the prompt.
Note
Not all formatting is correctly disabled if this option is disabled.
Will be disabled if
tput
is not found.New in version 2.0.
- LP_ENABLE_CONTAINER: bool = 0
Indicate if the shell is running in a container environment (e.g. Docker, Podman, LXC, Singularity, systemd-nspawn).
Note
Containers may inherit some or even no variables from their parent shell, so this may behave inconsisently with different container software. For example, Docker doesn’t inherit anything unless explicitly told to. Singularity in many configurations inherits most variables but shell functions and zsh hooks might not make it in. For full functionality, liquidprompt may need to be sourced inside the child container.
See also:
LP_COLOR_CONTAINER
.New in version 2.1.
- LP_ENABLE_DETACHED_SESSIONS: bool = 1
Display the number of detached multiplexer sessions.
Will be disabled if neither
screen
nortmux
are found.Note
This can be slow on some machines, and prompt speed can be greatly improved by disabling it.
See also:
LP_COLOR_JOB_D
.New in version 2.0.
- LP_ENABLE_DIRSTACK: bool = 0
Display the size of the directory stack if it is greater than
1
.See also:
LP_MARK_DIRSTACK
andLP_COLOR_DIRSTACK
.New in version 2.0.
- LP_ENABLE_ERROR: bool = 1
Display the last command error code if it is not
0
.See also:
LP_COLOR_ERR
.New in version 2.0.
- LP_ENABLE_FOSSIL: bool = 1
Display VCS information inside Fossil repositories.
Will be disabled if
fossil
is not found.See also:
LP_MARK_FOSSIL
.
- LP_ENABLE_FQDN: bool = 0
Deprecated since version 2.1: Use
LP_HOSTNAME_METHOD
set to “full” instead.Use the fully qualified domain name (FQDN) instead of the short hostname when the hostname is displayed.
Note
This never functioned as intended, and would only show the FQDN if
/etc/hostname
contained the full domain name. For a more portable and reliable version, setLP_HOSTNAME_METHOD
to “fqdn”.See also:
LP_HOSTNAME_ALWAYS
.
- LP_ENABLE_GIT: bool = 1
Display VCS information inside Git repositories.
Will be disabled if
git
is not found.See also:
LP_MARK_GIT
.
- LP_ENABLE_HG: bool = 1
Display VCS information inside Mercurial repositories.
Will be disabled if
hg
is not found.See also:
LP_MARK_HG
andLP_HG_COMMAND
.
- LP_ENABLE_JOBS: bool = 1
Display the number of running and sleeping shell jobs.
See also:
LP_COLOR_JOB_R
andLP_COLOR_JOB_Z
.
- LP_ENABLE_KUBECONTEXT: bool = 0
Display the current Kubernetes context.
See also:
LP_ENABLE_KUBE_NAMESPACE
,LP_DELIMITER_KUBECONTEXT_PREFIX
,LP_DELIMITER_KUBECONTEXT_SUFFIX
,LP_COLOR_KUBECONTEXT
, andLP_MARK_KUBECONTEXT
.New in version 2.1.
- LP_ENABLE_KUBE_NAMESPACE: bool = 0
Display the current Kubernetes default namespace in the current context.
See also:
LP_ENABLE_KUBECONTEXT
,LP_DELIMITER_KUBECONTEXT_PREFIX
,LP_DELIMITER_KUBECONTEXT_SUFFIX
,LP_COLOR_KUBECONTEXT
, andLP_MARK_KUBECONTEXT
.New in version 2.1.
- LP_ENABLE_LOAD: bool = 1
Display the load average over the past 1 minutes when above the threshold.
See also:
LP_LOAD_THRESHOLD
,LP_LOAD_CAP
,LP_MARK_LOAD
,LP_PERCENTS_ALWAYS
, andLP_COLORMAP
.
- LP_ENABLE_NODE_VENV: bool = 0
Display the currently activated nodeenv or NVM virtual environment.
See also:
LP_COLOR_NODE_VENV
.New in version 2.1.
- LP_ENABLE_PERM: bool = 1
Display a colored
LP_MARK_PERM
in the prompt to show when the user does not have write permission to the current directory.See also:
LP_COLOR_WRITE
andLP_COLOR_NOWRITE
.
- LP_ENABLE_PROXY: bool = 1
Display a
LP_MARK_PROXY
mark when an HTTP proxy is detected.See also:
LP_COLOR_PROXY
.
- LP_ENABLE_RUBY_VENV: bool = 1
Display the currently activated RVM or RBENV virtual environment.
See also:
LP_RUBY_RVM_PROMPT_OPTIONS
andLP_COLOR_RUBY_VENV
.New in version 2.1.
- LP_ENABLE_RUNTIME: bool = 1
Display runtime of the previous command if over
LP_RUNTIME_THRESHOLD
.See also:
LP_COLOR_RUNTIME
.
- LP_ENABLE_RUNTIME_BELL: bool = 0
Ring the terminal bell if the previous command ran longer than
LP_RUNTIME_BELL_THRESHOLD
.New in version 1.12.
- LP_ENABLE_SCLS: bool = 1
Display the currently activated Red Hat Software Collection.
See also:
LP_COLOR_VIRTUALENV
.
- LP_ENABLE_SCREEN_TITLE: bool = 0
Set the terminal title while in a terminal multiplexer.
LP_ENABLE_TITLE
must be enabled to have any effect.
- LP_ENABLE_SHLVL: bool = 1
Show the value of
$SHLVL
, which is the number of nested shells. For example, if one runsbash
inside their shell, it will open a new shell inside their current shell, and this will display “2”.See also:
LP_MARK_SHLVL
andLP_COLOR_SHLVL
.New in version 2.1.
- LP_ENABLE_SHORTEN_PATH: bool = 1
Use the shorten path feature if the path is too long to fit in the prompt line.
See also:
LP_PATH_METHOD
,LP_PATH_LENGTH
,LP_PATH_KEEP
,LP_PATH_CHARACTER_KEEP
, andLP_MARK_SHORTEN_PATH
.
- LP_ENABLE_SSH_COLORS: bool = 0
Replace
LP_COLOR_SSH
with a color based on the hash of the hostname. This can give each host a “color feel” to help distinguish them.See also:
LP_HOSTNAME_ALWAYS
.
- LP_ENABLE_SUDO: bool = 0
Check if the user has valid
sudo
credentials, and display an indicating mark or color.Will be disabled if
sudo
is not found.Warning
Each evocation of
sudo
by default writes to the syslog, and this will runsudo
once each prompt, unless you have NOPASSWD powers. This is likely to make your sysadmin hate you.See also:
LP_COLOR_MARK_SUDO
.
- LP_ENABLE_SVN: bool = 1
Display VCS information inside Subversion repositories.
Will be disabled if
svn
is not found.See also:
LP_MARK_SVN
.
- LP_ENABLE_TEMP: bool = 1
Display the highest system temperature if above the threshold.
Will be disabled if neither
sensors
noracpi
are found, or fails to read from the Linux sysfs system.See also:
LP_TEMP_THRESHOLD
,LP_MARK_TEMP
, andLP_COLORMAP
.
- LP_ENABLE_TERRAFORM: bool = 0
Display the currently activated Terraform workspace.
See also:
LP_COLOR_TERRAFORM
.New in version 2.1.
- LP_ENABLE_TIME: bool = 0
Displays the time at which the prompt was shown. The format can be configured with
LP_TIME_FORMAT
.See also:
LP_TIME_ANALOG
andLP_COLOR_TIME
.
- LP_ENABLE_TITLE: bool = 0
Set the terminal title to part or all of the prompt string, depending on the theme.
Must be enabled to be able to set the manual title with
lp_title()
.Warning
This may not work properly on exotic terminals. Please report any issues.
- LP_ENABLE_TITLE_COMMAND: bool = 1
Postpend the currently running command to the terminal title while the command is running.
LP_ENABLE_TITLE
must be enabled to have any effect.New in version 2.1.
- LP_ENABLE_VCS_ROOT: bool = 0
Enable VCS features when running as root. This is disabled by default for security.
- LP_ENABLE_VIRTUALENV: bool = 1
Display the currently activated Python or Conda virtual environment.
See also:
LP_COLOR_VIRTUALENV
.
- LP_ENABLE_WIFI_STRENGTH: bool = 0
Display an indicator if any wireless signal strength percentage is below
LP_WIFI_STRENGTH_THRESHOLD
. Also show the strength percentage ifLP_PERCENTS_ALWAYS
is enabled.Both Linux and MacOS are supported.
See also:
LP_MARK_WIFI
andLP_COLORMAP
.New in version 2.1.
- LP_HG_COMMAND: string = "hg"
The command to use for Mercurial commands. Can be used to replace
hg
withrhg
orchg
.See also:
LP_ENABLE_HG
andLP_MARK_HG
.New in version 2.1.
- LP_HOSTNAME_ALWAYS: int = 0
Determine when the hostname should be displayed. Valid values are:
0
- show the hostname, except when locally connected1
- always show the hostname-1
- never show the hostname
See also:
LP_COLOR_HOST
andLP_ENABLE_SSH_COLORS
.
- LP_HOSTNAME_METHOD: string = "short"
Determine the method for displaying the hostname.
short: show the first section of the hostname, what is before the first dot. Equal to
\h
in Bash or%m
in Zsh.full: show the full hostname, without any domain name. Equal to
\H
in Bash or%M
in Zsh.fqdn: show the fully qualified domain name, if it exists. Defaults to full if not.
pretty: show the pretty hostname, also called “machine display name”. Defaults to full if one does not exist.
See also:
LP_HOSTNAME_ALWAYS
.New in version 2.1.
- LP_PERCENTS_ALWAYS: bool = 1
Display the actual values of load, batteries, and wifi signal strength along with their corresponding marks. Disable to only print the colored marks.
See also:
LP_ENABLE_LOAD
,LP_ENABLE_BATT
,LP_ENABLE_WIFI_STRENGTH
.
- LP_RUBY_RVM_PROMPT_OPTIONS: array<string> = (i v g s)
An array of single letter switches to customize the RVM prompt output.
Will only have an effect if
LP_ENABLE_RUBY_VENV
is enabled and you are using RVM (i.e. no effect with RBENV).New in version 2.1.
- LP_TIME_ANALOG: bool = 0
Shows the time using an analog clock instead of numeric values. The analog clock is “accurate” to the nearest half hour. You must have a unicode-capable terminal and a font with the “CLOCK” characters (U+1F550 - U+1F567).
Will only have an effect if
LP_ENABLE_TIME
is enabled.
- LP_USER_ALWAYS: int = 1
Determine when the username should be displayed. Valid values are:
0
- show the username, except when the user is the login user1
- always show the username-1
- never show the username
See also:
LP_COLOR_USER_LOGGED
,LP_COLOR_USER_ALT
, andLP_COLOR_USER_ROOT
.Changed in version 2.0: The
-1
option was added.
Thresholds
- LP_BATTERY_THRESHOLD: int = 75
The percentage threshold that the battery level needs to fall below before it will be displayed in
LP_COLOR_CHARGING_UNDER
orLP_COLOR_DISCHARGING_UNDER
color. Otherwise, it will be displayed inLP_COLOR_CHARGING_ABOVE
orLP_COLOR_DISCHARGING_ABOVE
color.LP_ENABLE_BATT
must be enabled to have any effect.
- LP_LOAD_CAP: float = 2.0
The value for load average per CPU to display with the max color scaling. Values above this number will still be displayed, but the colors will not increase in intensity.
LP_ENABLE_LOAD
must be enabled to have any effect.See also:
LP_COLORMAP
.New in version 2.0.
- LP_LOAD_THRESHOLD: float = 0.60
Display the load average per CPU when above this threshold. For historical reasons, this number must have a decimal point (‘.’), or it will be treated as a percentage.
LP_ENABLE_LOAD
must be enabled to have any effect.Changed in version 2.0: Accepts float values of actual load averages. Integer values of centiload are still accepted, but deprecated.
- LP_RUNTIME_THRESHOLD: int = 2
Time in seconds that a command must run longer than for its runtime to be displayed.
LP_ENABLE_RUNTIME
must be enabled to have any effect.
- LP_RUNTIME_BELL_THRESHOLD: int = 10
Time in seconds that a command must run longer than for the terminal bell to be rung.
LP_ENABLE_RUNTIME_BELL
must be enabled to have any effect.New in version 1.12.
- LP_TEMP_THRESHOLD: int = 60
Display the highest system temperature when the temperature is above this threshold (in degrees Celsius).
LP_ENABLE_TEMP
must be enabled to have any effect.
- LP_WIFI_STRENGTH_THRESHOLD: int = 40
Display the lowest wireless signal strength when the strength percentage is below this threshold.
LP_ENABLE_WIFI_STRENGTH
must be enabled to have any effect.New in version 2.1.
Marks
- LP_MARK_ADAPTER: string = "⏚"
Mark used for battery display when charging.
See also:
LP_ENABLE_BATT
.
- LP_MARK_BATTERY: string = "⌁"
Mark used for battery display when on battery power.
See also:
LP_ENABLE_BATT
.
- LP_MARK_BRACKET_CLOSE: string = "]"
Mark used for closing core prompt brackets. Used by the default theme for enclosing user, host, and current working directory sections.
See also:
LP_MARK_BRACKET_OPEN
,LP_MARK_MULTIPLEXER_CLOSE
.
- LP_MARK_BRACKET_OPEN: string = "["
Mark used for opening core prompt brackets. Used by the default theme for enclosing user, host, and current working directory sections.
See also:
LP_MARK_BRACKET_CLOSE
,LP_MARK_MULTIPLEXER_OPEN
.
- LP_MARK_BZR: string = "⚯"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is inside of a Bazaar repository.See also:
LP_ENABLE_BZR
.
- LP_MARK_DEFAULT: string = "$" (Bash) or "%" (Zsh)
Mark used to indicate that the prompt is ready for user input, unless some other context overrides it, like a VCS repository.
- LP_MARK_DIRSTACK: string = "⚞"
Mark used to indicate the size of the directory stack. Here are some alternative marks you might like: ⚟ = ≡ ≣
See also:
LP_ENABLE_DIRSTACK
andLP_COLOR_DIRSTACK
.New in version 2.0.
- LP_MARK_DISABLED: string = "⌀"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is disabled for VCS display throughLP_DISABLED_VCS_PATHS
.
- LP_MARK_FOSSIL: string = "⌘"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is inside of a Fossil repository.See also:
LP_ENABLE_FOSSIL
.
- LP_MARK_GIT: string = "±"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is inside of a Git repository.See also:
LP_ENABLE_GIT
.
- LP_MARK_HG: string = "☿"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is inside of a Mercurial repository.See also:
LP_ENABLE_HG
andLP_HG_COMMAND
.
- LP_MARK_KUBECONTEXT: string = "⎈"
Mark used to prefix the current Kubernetes context.
Used to visually distinguish the Kubernetes context from other context fields like the Python virtual environment (see
LP_ENABLE_VIRTUALENV
) and the Red Hat Software Collection (seeLP_ENABLE_SCLS
).The display of Unicode characters varies among Terminal and Font settings, so you might try alternative marks. Single symbol alternatives to the default “⎈” (U+2388, Helm Symbol) are “☸” (U+2638, Wheel of Dharma) or “κ” (U+03BA, Greek Small Letter Kappa).
See also:
LP_ENABLE_KUBECONTEXT
.New in version 2.1.
- LP_MARK_LOAD: string = "⌂"
Mark used before displaying load average.
See also:
LP_ENABLE_LOAD
.
- LP_MARK_MULTIPLEXER_CLOSE: string = $LP_MARK_BRACKET_CLOSE
Mark used for closing core prompt brackets. Used by the default theme when inside of a multiplexer.
See also:
LP_MARK_MULTIPLEXER_OPEN
,LP_MARK_BRACKET_CLOSE
.New in version 2.1.
- LP_MARK_MULTIPLEXER_OPEN: string = $LP_MARK_BRACKET_OPEN
Mark used for opening core prompt brackets. Used by the default theme when inside of a multiplexer.
See also:
LP_MARK_MULTIPLEXER_CLOSE
,LP_MARK_BRACKET_OPEN
.New in version 2.1.
- LP_MARK_PERM: string = ":"
Mark used by default separate hostname and current working directory, and is colored to indicate user permissions on the current directory.
Is still used (without colors) if
LP_ENABLE_PERM
is disabled.New in version 1.12.
- LP_MARK_PROXY: string = "↥"
Mark used to indicate a proxy is active.
See also:
LP_ENABLE_PROXY
.
- LP_MARK_SHLVL: string = "└"
Mark used to indicate the shell is inside another shell.
See also:
LP_ENABLE_SHLVL
andLP_COLOR_SHLVL
.New in version 2.1.
- LP_MARK_SHORTEN_PATH: string = " … "
Mark used to indicate a portion of the path was hidden to save space. Not all shortening methods use this mark, some only use
LP_COLOR_PATH_SHORTENED
.See also:
LP_ENABLE_SHORTEN_PATH
,LP_PATH_METHOD
.
- LP_MARK_STASH: string = "+"
Mark used to indicate at least one stash or shelve exists in the current repository.
- LP_MARK_SVN: string = "‡"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is inside of a Subversion repository.See also:
LP_ENABLE_SVN
.
- LP_MARK_TEMP: string = "θ"
Mark used before displaying temperature.
See also:
LP_ENABLE_TEMP
.
- LP_MARK_UNTRACKED: string = "*"
Mark used to indicate untracked or extra files exist in the current repository.
- LP_MARK_VCSH: string = "|"
Mark used instead of
LP_MARK_DEFAULT
to indicate that the current directory is inside of a VCSH repository.Since VCSH repositories are Git repositories under the hood,
LP_MARK_GIT
is surrounded in this mark.
- LP_MARK_WIFI: string = "📶"
Mark used before displaying wireless signal strength.
See also:
LP_ENABLE_WIFI_STRENGTH
.New in version 2.1.
Colors
These color strings will be used without modification, so they need to be valid
terminal escape sequences, either generated with lp_terminal_format()
or
using the $COLOR
variables.
Valid preset color variables are:
BOLD
- bold formatting only.BLACK
BOLD_GRAY
- actually bold blackRED
BOLD_RED
GREEN
BOLD_GREEN
YELLOW
BOLD_YELLOW
BLUE
BOLD_BLUE
PURPLE
orMAGENTA
BOLD_PURPLE
,BOLD_MAGENTA
orPINK
CYAN
BOLD_CYAN
WHITE
BOLD_WHITE
WARN_RED
- black foreground, red backgroundCRIT_RED
- white foreground, red backgroundDANGER_RED
- yellow foreground, red background
- LP_COLORMAP: array<string>
An array of colors that is used by the battery, load, temperature, and wireless signal strength features to indicate the severity level of their status. A normal or low status will use the first index, while the last index is the most severe.
The default array is:
( "" $GREEN $BOLD_GREEN $YELLOW $BOLD_YELLOW $RED $BOLD_RED $WARN_RED $CRIT_RED $DANGER_RED )
See also:
LP_ENABLE_BATT
,LP_ENABLE_LOAD
,LP_ENABLE_TEMP
, andLP_ENABLE_WIFI_STRENGTH
.
- LP_COLOR_AWS_PROFILE: string = $YELLOW
Color used to display the current active AWS Profile.
See also:
LP_ENABLE_AWS_PROFILE
.New in version 2.1.
- LP_COLOR_CHANGES: string = $RED
Color used to indicate that the current repository is not clean, or in other words, has changes that have not been committed.
- LP_COLOR_CHARGING_ABOVE: string = $GREEN
Color used to indicate that the battery is charging and above the
LP_BATTERY_THRESHOLD
.See also:
LP_ENABLE_BATT
.
- LP_COLOR_CHARGING_UNDER: string = $YELLOW
Color used to indicate that the battery is charging and under the
LP_BATTERY_THRESHOLD
.See also:
LP_ENABLE_BATT
.
- LP_COLOR_COMMITS_BEHIND: string = $BOLD_RED
Color used to indicate that the current repository has a remote tracking branch that has commits that the local branch does not.
- LP_COLOR_COMMITS: string = $YELLOW
Color used to indicate that the current repository has commits on the local branch that the remote tracking branch does not.
Also used to color
LP_MARK_STASH
.
- LP_COLOR_CONTAINER: string = $BOLD_BLUE
Color used to indicate that the current shell is running in a container
New in version 2.1.
- LP_COLOR_DIFF: string = $PURPLE
Color used to indicate that the current repository has lines that have been changed since the last commit.
- LP_COLOR_DIRSTACK: string = $BOLD_YELLOW
Color used to indicate the size of the directory stack.
See also:
LP_ENABLE_DIRSTACK
andLP_MARK_DIRSTACK
.New in version 2.0.
- LP_COLOR_DISCHARGING_ABOVE: string = $YELLOW
Color used to indicate that the battery is discharging and above the
LP_BATTERY_THRESHOLD
.See also:
LP_ENABLE_BATT
.
- LP_COLOR_DISCHARGING_UNDER: string = $RED
Color used to indicate that the battery is discharging and above the
LP_BATTERY_THRESHOLD
.See also:
LP_ENABLE_BATT
.
- LP_COLOR_ERR: string = $PURPLE
Color used to indicate the last command exited with a non-zero return code.
See also:
LP_ENABLE_ERROR
.
- LP_COLOR_HOST: string = ""
Color used for the hostname when connected locally.
See also:
LP_HOSTNAME_ALWAYS
.
- LP_COLOR_IN_MULTIPLEXER: string = $BOLD_BLUE
Color used for
LP_MARK_MULTIPLEXER_OPEN
andLP_MARK_MULTIPLEXER_CLOSE
if the terminal is in a multiplexer.
- LP_COLOR_JOB_D: string = $YELLOW
Color used for detached multiplexer sessions.
See also:
LP_ENABLE_DETACHED_SESSIONS
.
- LP_COLOR_JOB_R: string = $BOLD_YELLOW
Color used for running shell jobs.
See also:
LP_ENABLE_JOBS
.
- LP_COLOR_JOB_Z: string = $BOLD_YELLOW
Color used for sleeping shell jobs.
See also:
LP_ENABLE_JOBS
.
- LP_COLOR_KUBECONTEXT: string = $CYAN
Color used for the current Kubernetes context.
See also:
LP_ENABLE_KUBECONTEXT
.New in version 2.1.
- LP_COLOR_MARK: string = $BOLD
Color used for
LP_MARK_DEFAULT
.
- LP_COLOR_MARK_ROOT: string = $BOLD_RED
Color used for
LP_MARK_DEFAULT
when the current user is root, shown instead ofLP_COLOR_MARK
.
- LP_COLOR_MARK_SUDO: string = $LP_COLOR_MARK_ROOT
Color used for
LP_MARK_DEFAULT
when sudo is active, shown instead ofLP_COLOR_MARK
.See also:
LP_ENABLE_SUDO
.
- LP_COLOR_NODE_VENV: string = $LP_COLOR_VIRTUALENV
Color used for displaying a Node.js virtual env.
See also:
LP_ENABLE_NODE_VENV
.New in version 2.1.
- LP_COLOR_NOWRITE: string = $RED
Color used for
LP_MARK_PERM
when the user does not have write permissions to the current working directory.See also:
LP_ENABLE_PERM
andLP_COLOR_WRITE
.
- LP_COLOR_PATH: string = ""
Color used for the current working directory.
If
LP_COLOR_PATH_LAST_DIR
,LP_COLOR_PATH_VCS_ROOT
,LP_COLOR_PATH_SEPARATOR
, orLP_COLOR_PATH_SHORTENED
are set, their respective sections will be colored with them instead.Changed in version 2.0: Default value changed from
$BOLD
to the default color.
- LP_COLOR_PATH_LAST_DIR: string = $BOLD
Color used for the last path segment, which corresponds to the current directory basename.
New in version 2.0.
- LP_COLOR_PATH_ROOT: string = $BOLD_YELLOW
Color used in place of
LP_COLOR_PATH
when the current user is root.
- LP_COLOR_PATH_SEPARATOR: string = lp_terminal_format 8 -1 0 0 -1 # Grey
Color used for the separator (‘/’) between path segments. If set to the empty string, the separator will take the format of the path segment before it.
- LP_COLOR_PATH_SHORTENED: string = lp_terminal_format 8 -1 0 0 -1 # Grey
Color used for path segments that have been shortened.
LP_ENABLE_SHORTEN_PATH
must be enabled to have any effect.
- LP_COLOR_PATH_VCS_ROOT: string = $BOLD
Color used for the path segment corresponding to the current VCS repository root directory.
LP_PATH_VCS_ROOT
must be enabled to have any effect.New in version 2.0.
- LP_COLOR_PROXY: string = $BOLD_BLUE
Color used for
LP_MARK_PROXY
.See also:
LP_ENABLE_PROXY
.
- LP_COLOR_RUBY_VENV: string = $LP_COLOR_VIRTUALENV
Color used for displaying a Ruby virtual env.
See also:
LP_ENABLE_RUBY_VENV
.New in version 2.1.
- LP_COLOR_RUNTIME: string = $YELLOW
Color used for displaying the last command runtime.
See also:
LP_ENABLE_RUNTIME
.
- LP_COLOR_SHLVL: string = $BOLD_GREEN
Color used for displaying the nested shell level.
See also:
LP_ENABLE_SHLVL
andLP_MARK_SHLVL
.New in version 2.1.
- LP_COLOR_SSH: string = $BLUE
Color used for displaying the hostname when connected with SSH.
Has no effect if
LP_ENABLE_SSH_COLORS
is enabled.See also:
LP_HOSTNAME_ALWAYS
.
- LP_COLOR_SU: string = $BOLD_YELLOW
Color used for displaying the hostname when running under
su
orsudo
.See also:
LP_HOSTNAME_ALWAYS
.
- LP_COLOR_TELNET: string = $WARN_RED
Color used for displaying the hostname when connected with Telnet.
See also:
LP_HOSTNAME_ALWAYS
.
- LP_COLOR_TERRAFORM: string = $PINK
Color used for displaying a Terraform workspace.
See also:
LP_ENABLE_TERRAFORM
.New in version 2.1.
- LP_COLOR_TIME: string = $BLUE
Color used for displaying the current time.
See also:
LP_ENABLE_TIME
.
- LP_COLOR_UP: string = $GREEN
Color used to indicate that the current repository is up-to-date and no commits differ from the remote tracking branch.
- LP_COLOR_USER_ALT: string = $BOLD
Color used for displaying the username when running as a different user than the login user.
- LP_COLOR_USER_LOGGED: string = ""
Color used for displaying the username when running as the login user.
See also:
LP_USER_ALWAYS
.
- LP_COLOR_USER_ROOT: string = $BOLD_YELLOW
Color used for displaying the username when running as root.
- LP_COLOR_VIRTUALENV: string = $CYAN
Color used for displaying a Python virtual env or Red Hat Software Collection.
See also:
LP_ENABLE_VIRTUALENV
andLP_ENABLE_SCLS
.
- LP_COLOR_WRITE: string = $GREEN
Color used for
LP_MARK_PERM
when the user has write permissions to the current working directory.See also:
LP_ENABLE_PERM
andLP_COLOR_NOWRITE
.
- LP_COLOR_X11_OFF: string = $YELLOW
Color used for indicating that a display is not connected.
- LP_COLOR_X11_ON: string = $GREEN
Color used for indicating that a display is connected.