~kota/battery

Print battery percentage. Maybe it'll work, maybe it wont!

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~kota/battery
read/write
git@git.sr.ht:~kota/battery

You can also use your local clone with git send-email.

#Battery

battery [charge_suffix] [decharge_suffix] [concat?]

The battery tool is meant to read battery charge percent and status and print to STDOUT.

Different amounts of options change how the program works. A single option + for example will make the program print the option back to you if your battery is charging. It will print nothing if it is not charging. If you instead want it to print something when it is discharging, add another option. So, battery + - will print a + when charging or a - when discharging.

Finally, to have the battery percent and charging status concatenated together add a third option. battery + - = will print your battery charge percent and the corresponding symbol for its charging status.

#License

See LICENSE in the root of this repo file for copyright and license details.

#Build

Build dependencies

  • golang
  • make

make all

#Install

Optionally configure config.mk to specify a different install location.
Defaults to /usr/local/

sudo make install

#Uninstall

sudo make uninstall