.\" Generated by scdoc 1.11.3 .\" 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" "2024-04-20" .PP .SH NAME battery - This module reads battery status .PP .SH DESCRIPTION .PP This module reads battery status from \fI/sys/class/power_supply\fR and uses \fBudev\fR to monitor for changes.\& .PP Note that it is common (and "normal") for batteries to be in the state \fBunknown\fR under certain conditions.\& .PP 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.\& .PP This does not happen with all batteries, and other batteries may enter the state \fBunknown\fR under other conditions.\& .PP .SH TAGS .PP .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 .PP .TS allbox;l l l lx l l l lx 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 milliseconds, to poll for capacity changes (default=\fB60000\fR).\& Set to `0` to disable polling (\fBwarning\fR: many batteries do not support asynchronous reporting).\& Cannot be less than 250ms.\& T} T{ battery-scale T} T{ int T} T{ no T} T{ How much to scale down the battery charge amount.\& Some batteries report too high resulting in bad discharge estimates.\& Default=1.\& T} T{ smoothing-secs T} T{ int T} T{ no T} T{ How many seconds to perform smoothing over for battery discharge estimates.\& Default=100s.\& T} .TE .sp 1 .SH EXAMPLES .PP .nf .RS 4 bar: left: - battery: name: BAT0 poll-interval: 30000 content: string: {text: "BAT: {capacity}% {estimate}"} .fi .RE .PP .SH SEE ALSO .PP \fByambar-modules\fR(5), \fByambar-particles\fR(5), \fByambar-tags\fR(5), \fByambar-decorations\fR(5) .PP