.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "yambar-modules-battery" "5" "2022-12-17" .P .SH NAME battery - This module reads battery status .P .SH DESCRIPTION .P This module reads battery status from \fI/sys/class/power_supply\fR and uses \fBudev\fR to monitor for changes.\& .P Note that it is common (and "normal") for batteries to be in the state \fBunknown\fR under certain conditions.\& .P For example, some have been seen to enter the \fBunknown\fR state when charging and the capacity reaches ~90%.\& The battery then stays in \fBunknown\fR, rather than \fBcharging\fR, until it has been fully charged and enters the state \fBfull\fR.\& .P This does not happen with all batteries, and other batteries may enter the state \fBunknown\fR under other conditions.\& .P .SH TAGS .P .TS allbox;l l lx l l lx l l lx l l lx l l lx l l lx l l lx. T{ \fBName\fR T} T{ \fBType\fR T} T{ \fBDescription\fR T} T{ name T} T{ string T} T{ Battery device name T} T{ manufacturer T} T{ string T} T{ Name of the battery manufacturer T} T{ model T} T{ string T} T{ Battery model name T} T{ state T} T{ string T} T{ One of \fBfull\fR, \fBnot charging\fR, \fBcharging\fR, \fBdischarging\fR or \fBunknown\fR T} T{ capacity T} T{ range T} T{ capacity left, in percent T} T{ estimate T} T{ string T} T{ Estimated time left (to empty while discharging, or to full while charging), formatted as HH:MM.\& T} .TE .sp 1 .SH CONFIGURATION .P .TS allbox;l l l lx l l l lx l l l lx. T{ \fBName\fR T} T{ \fBType\fR T} T{ \fBReq\fR T} T{ \fBDescription\fR T} T{ name T} T{ string T} T{ yes T} T{ Battery device name (one of the names in \fB/sys/class/power_supply\fR) T} T{ poll-interval T} T{ int T} T{ no T} T{ How often, in seconds, to poll for capacity changes (default=\fB60\fR).\& Set to `0` to disable polling (\fBwarning\fR: many batteries do not support asynchronous reporting).\& T} .TE .sp 1 .SH EXAMPLES .P .nf .RS 4 bar: left: - battery: name: BAT0 poll-interval: 30 content: string: {text: "BAT: {capacity}% {estimate}"} .fi .RE .P .SH SEE ALSO .P \fByambar-modules\fR(5), \fByambar-particles\fR(5), \fByambar-tags\fR(5), \fByambar-decorations\fR(5) .P