Starship Prompt Builder

Battery module

Shows how charged the device's battery is and its current charging status

When it appears

It renders when Starship detects the matching context and its configured conditions are met.

Preview

Rendered from the starting configuration in a representative simulated environment.

starship — preview
󰂃 8% 

Starting configuration

[battery]
format = "[$symbol$percentage]($style) "
Open in the builder

The configuration is compressed into the URL fragment and stays in your browser.

Key options

full_symbolstring
The symbol shown when the battery is full.
charging_symbolstring
The symbol shown when the battery is charging.
discharging_symbolstring
The symbol shown when the battery is discharging.
unknown_symbolstring
The symbol shown when the battery state is unknown.
empty_symbolstring
The symbol shown when the battery state is empty.
displayarray
Display threshold and style for the module.
disabledboolean
Disables the battery module.
formatstring
The format for the module.

Format variables

$percentage
The current charge
$symbol
The symbol for the current charging state

Common adjustments

  • Edit format to reorder its variables or make surrounding text conditional.