odknt / bspwmbar

A lightweight status bar for bspwm.
ISC License
92 stars 11 forks source link

add(battery): add battery module #28

Closed odknt closed 4 years ago

odknt commented 4 years ago

fixes #20

ex.

...
    { /* battery */
        .battery = {
            .func = battery,
            .prefix = " ", // 0 - 9%
            .prefix_1 = " ", // 10 - 30%
            .prefix_2 = " ", //  31 - 60%
            .prefix_3 = " ", // 61 - 89%
            .prefix_4 = " ", // 90 - 100%
            .suffix = "%",
            .path = "/sys/class/power_supply/BAT0/uevent",
        },
    },
...