battery battery status pill
Battery status drawn from bucketed SVG icons in a small pill, with an optional percent + charging-state label. Reads /sys/class/power_supply. The template for the status-icon pattern.

The glyph is chosen from bucketed SVG icons by charge level and charging state, read from
/sys/class/power_supply. A machine with no battery shows the "AC" glyph. This widget is
also the copy-me starting point for writing your own status-icon pill.
See the widgets overview for the shared pill_color /
icon_color, anchor, font, and debug_border keys.
Properties
| key | type | default | meaning |
|---|---|---|---|
pill_color | [r,g,b,a] | `[0.059, 0.071, 0.11, 0.686]` | Chip background behind the glyph. `[0, 0, 0, 0]` draws no chip. |
icon_color | [r,g,b,a] | white | Tints the glyph. Omit for white. |
show_label | bool | `false` | Show the percent + state text (e.g. `64% Discharging`, or `AC` on a desktop with no battery). Off = icon-only pill. |
label_color | [r,g,b,a] | `[0.95, 0.95, 0.95, 1.0]` | Label text color (RGB only; alpha does not hide it). |
label_pos | string | `"bottom"` | Label position relative to the glyph: `top`, `bottom`, `left`, or `right`. |
every key is optional; omit it and the default applies. misspelled keys are silently ignored, so if a setting seems to do nothing, check the spelling against this table. colors are 0.0–1.0 float arrays.