polybar_another_battery

command module
v0.0.0-...-7b6a1e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2023 License: GPL-3.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

About

Simple battery charge level watcher with notifications (libnotify)

Requirements

  • (Build) go1.17
  • (Build) libnotify-dev, pkg-config
  • (Run) Font for battery indicator - 3270Medium NF
  • (Run) libnotify
  • (Run) UPower (-time-to flag)

Packages

Build manually

go get -u github.com/distatus/battery/cmd/battery
make build

Usage

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

Polybar

Built in polybar support. Add flag -polybar for get stdout output in polybar format: Charging

Polybar module example
[module/custom-battery]
type = custom/script
exec = polybar-ab -polybar -thr 10 -font 6 -time-to
tail = true

TODO

  • ETA battery life when discharging
  • Battery health level (based on full/design capacity)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址