Liquid Prompt Powerline Themes

The powerline.theme file includes multiple themes, all modeled after the Powerline style.

Installation

Download

You can download the latest release from GitHub, using git or downloading the theme file directly.

Install with Git

To download to ~/liquidprompt-powerline, run:

git clone --branch stable https://github.com/liquidprompt/liquidprompt-powerline.git ~/liquidprompt-powerline

Or, if you want to use the development (non-stable) branch:

git clone https://github.com/liquidprompt/liquidprompt-powerline.git ~/liquidprompt-powerline

Install by direct download

If you do not have git, you can download and extract the source in zip or gzip format directly from the release page.

Alternatively, you can download the theme file directly:

https://raw.githubusercontent.com/liquidprompt/liquidprompt-powerline/stable/powerline.theme

Or, if you want to use the development (non-stable) branch:

https://raw.githubusercontent.com/liquidprompt/liquidprompt-powerline/main/powerline.theme

Setup

By default, the dividers and markers used are the Powerline private characters. You will either need a compatible font, or to configure the dividers and markers to use other characters.

See the Powerline Fonts installation docs for help.

Usage

See the Liquid Prompt documentation on switching themes for details on how to load and use these themes.

Powerline

The powerline theme is a clone of the Powerline prompt. It copies the default segments of the Powerline prompt for Shell.

This prompt is a proof of (a specific) concept: that Liquid Prompt can do what Powerline does, but faster. That said, this is a fully usable theme.

New in version 1.0.

Preview

If there is nothing special about the current context, the appearance of Powerline might be as simple as this:

 user  ~ 

If you are running a background command and are also in the “main” branch of a Git repository on a server:

  server  user  ~  liquidprompt  1   main 

When Liquid Prompt is displaying nearly everything, it may look like this:

  server  user  (e) pyenv  ~   …   liquidprompt   …   theme  3   main  ST 1  125 

Note

The above “everything” image looks like it is missing some parts because this theme does not implement all data sources of Liquid Prompt. This is by design to clone basic Powerline. For a Powerline theme that does show all data sources, see Powerline Full.

Configuration

Liquid Prompt Configuration

The following Liquid Prompt config options are respected:

Theme Configuration

Powerline adds these config options:

Markers
POWERLINE_HARD_DIVIDER: string = ""  # U+E0B0

The divider character between sections, defaults to the private character used in Powerline fonts that looks like a solid right arrow.

POWERLINE_PYTHON_ENV_MARKER: string = "(e) "

The marker string used to indicate the following string is a Python environment.

POWERLINE_ROOT_MARKER: string = "#"

The marker character used to indicate a root session.

POWERLINE_SECURE_MARKER: string = ""  # U+E0A2

The marker character used to indicate a SSH session, defaults to the private character used in Powerline fonts that looks like a lock.

POWERLINE_SOFT_DIVIDER: string = ""  # U+E0B1

The divider character between similar sections, defaults to the private character used in Powerline fonts that looks like a thin right arrow.

POWERLINE_SPACER: string = " "  # U+00A0: non-breaking space

The marker character used to pad sections, defaults to the non-breaking space character.

To add more padding, add more spaces to this string.

A non-breaking space is needed in some fonts to prevent multiple spaces from collapsing to one space, loosing the padding.

POWERLINE_STASH_MARKER: string = "ST"

The marker string used to indicate stashes exist in the VCS repository.

POWERLINE_VCS_MARKER: string = ""  # U+E0A0

The marker character used to indicate a VCS repository, defaults to the private character used in Powerline fonts that looks like a branching commit history.

Colors

These color config options take an array of integers, which are arguments to lp_terminal_format().

Note

Arrays are set without commas (,). The default values are displayed with commas for clarity.

POWERLINE_ERROR_COLOR: array<int> = (231, 52, 0, 0, 7, 1)

Color for the error code section.

POWERLINE_HOST_COLOR: array<int> = (220, 166, 0, 0, 3, 2)

Color for the hostname section.

POWERLINE_JOBS_COLOR: array<int> = (220, 166, 0, 0, 3, 2)

Color for the shell jobs section.

POWERLINE_PATH_COLOR: array<int> = (250, 240, 0, 0, 7, 0)

Color for the current working directory section.

POWERLINE_PATH_LAST_COLOR: array<int> = (252, 240, 1, 0, 7, 0)

Color for the current working directory last subsection.

POWERLINE_PATH_SEPARATOR_COLOR: array<int> = (245, 240, 0, 0, 7, 0)

Color for the current working directory subsection separator.

POWERLINE_PATH_SHORTENED_COLOR: array<int> = (245, 240, 0, 0, 7, 0)

Color for any sections in the current working directory that are shortened to make the path fit in LP_PATH_LENGTH.

POWERLINE_PATH_VCS_COLOR: array<int> = (147, 240, 1, 0, 4, 0)

Color for the current working directory segment corresponding to the current VCS repository root directory.

LP_PATH_VCS_ROOT must be enabled to have any effect.

POWERLINE_PYTHON_ENV_COLOR: array<int> = (231, 74, 0, 0, 7, 4)

Color for the Python environment section.

POWERLINE_USER_COLOR: array<int> = (231, 31, 1, 0, 7, 6)

Color for the username section.

POWERLINE_VCS_CLEAN_COLOR: array<int> = (250, 236, 0, 0, 7, 0)

Color for the VCS section if the repository is clean.

POWERLINE_VCS_DIRTY_COLOR: array<int> = (220, 236, 0, 0, 3, 0)

Color for the VCS section if the repository is not clean.

POWERLINE_VCS_STASH_COLOR: array<int> = (220, 236, 0, 0, 3, 0)

Color for the VCS stash subsection.

Powerline Full

An extension of the Powerline theme, powerline_full includes all data sources that Liquid Prompt provides. The ordering is the same as the default theme.

New in version 1.0.

Preview

If there is nothing special about the current context, the appearance of Powerline might be as simple as this:

 user  ~ 

If you are running a background command and are also in the “main” branch of a Git repository on a server:

 1&  user   server  ~  liquidprompt  main 

When Liquid Prompt is displaying nearly everything, it may look like this:

 🕤  ⌁24%  ⌂1.68  θ90°  3d/2&/1z  user   server  ~   …   liquidprompt   …   theme  ⚞3  (e) pyenv  main(+10/-5,+3/-1)+*  20s  125 

Configuration

Liquid Prompt Configuration

All Liquid Prompt config options are respected, except for:

Theme Configuration

Powerline Full uses all the config options of the Powerline theme, except for:

Powerline Full adds these config options:

Markers
POWERLINE_AWS_PROFILE_MARKER: string = "AWS: "

The marker string used to indicate the following string is the name of an AWS profile.

POWERLINE_CHROOT_MARKER: string = "chroot: "

The marker string used to indicate the following string is a chroot.

POWERLINE_KUBECONTEXT_MARKER: string = $LP_MARK_KUBECONTEXT

The marker string used to indicate the following string is the name of a kubectl context.

POWERLINE_NODE_ENV_MARKER: string = "node: "

The marker string used to indicate the following string is a Node.js environment.

POWERLINE_PROXY_MARKER: string = "proxy: "

The marker string used to indicate the following string is a HTTP proxy.

POWERLINE_RUBY_ENV_MARKER: string = "ruby: "

The marker string used to indicate the following string is a Ruby environment.

POWERLINE_SOFTWARE_COLLECTION_MARKER: string = "(sc) "

The marker string used to indicate the following string is a Red Hat Software Collection.

POWERLINE_TERRAFORM_ENV_MARKER: string = "(tf) "

The marker string used to indicate the following string is a Terraform workspace.

Colors

Note

Arrays are set without commas (,). The default values are displayed with commas for clarity.

POWERLINE_AWS_PROFILE_COLOR: array<int> = (190, 236, 0, 0, 3, 0)

Color for the AWS profile section.

POWERLINE_BATTERY_COLOR: array<int> = (-1, 238, 0, 0, -1, 0)

Color for the battery section.

POWERLINE_CHROOT_COLOR: array<int> = (219, 30, 0, 0, 7, 4)

Color for the chroot section.

POWERLINE_CONTAINER_COLOR: array<int> = $POWERLINE_NEUTRAL_COLOR

Color for the container indicator section.

POWERLINE_DIRSTACK_COLOR: array<int> = $POWERLINE_NEUTRAL_COLOR

Color for the directory stack section.

POWERLINE_KUBECONTEXT_COLOR: array<int> = (231, 74, 0, 0, 7, 4)

Color for the Kubernetes context section.

POWERLINE_LOAD_COLOR: array<int> = (-1, 148, 0, 0, -1, 3)

Color for the CPU load section.

POWERLINE_NEUTRAL_COLOR: array<int> = (252, 234, 0, 0, 7, 0)

Color for all neutral sections, LP_PS1_PREFIX and LP_PS1_POSTFIX.

POWERLINE_NODE_ENV_COLOR: array<int> = $POWERLINE_PYTHON_ENV_COLOR

Color for the Node.js environment section.

POWERLINE_PROXY_COLOR: array<int> = (21, 219, 1, 0, 4, 7)

Color for the HTTP proxy section.

POWERLINE_RUBY_ENV_COLOR: array<int> = $POWELINE_PYTHON_ENV_COLOR

Color for the Ruby environment section.

POWERLINE_RUNTIME_COLOR: array<int> = (226, 17, 0, 0, 3, 4)

Color for the command runtime section.

POWERLINE_SHLVL_COLOR: array<int> = (231, 58, 0, 0, 7, 2)

Color for the nested shell level section.

POWERLINE_SOFTWARE_COLLECTIONS_COLOR: array<int> = (231, 62, 0, 0, 7, 5)

Color for the Red Hat Software Collections section.

POWERLINE_TEMPERATURE_COLOR: array<int> = (-1, 240, 0, 0, -1, 0)

Color for the temperature section.

POWERLINE_TERRAFORM_ENV_COLOR: array<int> = (231, 182, 0, 0, 7, 4)

Color for the Terraform workspace.

POWERLINE_TIME_COLOR: array<int> = (33, 17, 0, 0, 5, 4)

Color for the current time section.

POWERLINE_WIFI_STRENGTH_COLOR: array<int> = (-1, 148, 0, 0, -1, 3)

Color for the wireless signal strength section.