Battery
Options and usage for the Battery module in mangobar.
Shows charge percent and status. By default the first battery found is used;
on multi-battery laptops each battery can be shown separately with
battery#BAT0, battery#BAT1, ... — each instance is configured and styled
independently, and a battery that is unplugged simply hides its module.
"modules-right": ["battery#BAT0", "battery#BAT1"],
"battery#BAT0": {
"format": "{icon} {percent}%",
"hide-on-ac": true
},
"battery#BAT1": {
"format": "{icon} {percent}%",
"hide-on-ac": true
}Options
| Option | Type | Default | Description |
|---|---|---|---|
format | string | {icon} {percent}% {status} | Display format (see placeholders) |
icons | string array | built-in 11 levels | Icons shown by charge level while discharging |
icon-charging | string | — | Icon used while charging |
icon-full | string | — | Icon used when full |
icon-ac | string | — | Plug icon shown when on AC |
hide-on-ac | bool | false | Hide the module entirely while plugged in |
device | string | first battery | sysfs battery device (plain battery module only) |
Placeholders
| Placeholder | Description |
|---|---|
{} / {percent} | Charge percent |
{icon} | Icon by state / level |
{status} | Status string (Charging / Full / Discharging / ...) |
{ac} | AC plug icon when plugged in |
Styling
#battery {
background: linear-gradient(to top, #b8bb26, mix(#b8bb26, #fbf1c7, 0.3));
color: #1b1a1a;
}Last updated on