Simple battery charge level watcher with notifications (libnotify)
- (Build) go1.17
- (Build) libnotify-dev, pkg-config
- (Run) Font for battery indicator - 3270Medium NF
- (Run) libnotify
- (Run) UPower (
-time-to
flag)
go get -u github.com/distatus/battery/cmd/battery
make build
Run with key -h
for get actual help
$ ./polybar-ab -h
Usage of ./polybar-ab:
-debug
Enable debug output to stdout
-font int
Set font numbler for polybar output (default 1)
-once
Check state and print once
-polybar
Print battery level in polybar format
-simple
Print battery level to stdout every check
-thr int
Set threshould battery level for notifications (default 10)
-time-to
Print "time to full" or "time to empty"
-version
Print version info and exit
Built in polybar support.
Add flag -polybar
for get stdout output in polybar format:
[module/custom-battery]
type = custom/script
exec = polybar-ab -polybar -thr 10 -font 6 -time-to
tail = true
- ETA battery life when discharging
- Battery health level (based on full/design capacity)