Skip to content
Jake Stanger edited this page Aug 9, 2024 · 9 revisions

Displays system power information such as the battery percentage, and estimated time to empty.

Note

This module requires that upower is installed and its service running.

TODO: ADD SCREENSHOT

Configuration

Type: upower

Name Type Default Description
format string {percentage}% Format string to use for the widget button label.
icon_size integer 24 Size to render icon at.
JSON
{
  "end": [
    {
      "type": "upower",
      "format": "{percentage}%"
    }
  ]
}
TOML
[[end]]
type = "upower"
format = "{percentage}%"
YAML
end:
  - type: "upower"
    format: "{percentage}%"
Corn
{
  end = [
    {
      type = "upower"
      format = "{percentage}%"
    }
  ]
}

Formatting Tokens

The following tokens can be used in the format config option, and will be replaced with values from the current battery state:

Token Description
{percentage} The battery charge percentage.
{state} The current battery (dis)charging state.
{time_remaining} The ETA to battery empty or full.

Styling

Selector Description
.upower Upower widget button.
.upower .contents Upower widget button contents.
.upower .icon Upower widget battery icon.
.upower .label Upower widget button label.
.popup-upower Upower popup box.
.popup-upower .upower-details Label inside the popup.

For more information on styling, please see the styling guide.

Clone this wiki locally