yambar-modules-battery - Man Page

This module reads battery status

Description

This module reads battery status from /sys/class/power_supply and uses udev to monitor for changes.

Note that it is common (and "normal") for batteries to be in the state unknown under certain conditions.

For example, some have been seen to enter the unknown state when charging and the capacity reaches ~90%. The battery then stays in unknown, rather than charging, until it has been fully charged and enters the state full.

This does not happen with all batteries, and other batteries may enter the state unknown under other conditions.

Tags

NameTypeDescription
namestringBattery device name
manufacturerstringName of the battery manufacturer
modelstringBattery model name
statestringOne of full, not charging, charging, discharging or unknown
capacityrangecapacity left, in percent
estimatestringEstimated time left (to empty while discharging, or to full while charging), formatted as HH:MM.

Configuration

NameTypeReqDescription
namestringyesBattery device name (one of the names in /sys/class/power_supply)
poll-intervalintnoHow often, in seconds, to poll for capacity changes (default=60). Set to `0` to disable polling (warning: many batteries do not support asynchronous reporting).

Examples

  bar:
    left:
      - battery:
          name: BAT0
          poll-interval: 30
          content:
            string: {text: "BAT: {capacity}% {estimate}"}

See Also

yambar-modules(5), yambar-particles(5), yambar-tags(5), yambar-decorations(5)

Referenced By

yambar-modules(5).

2022-08-26