~kota/battery

battery/README.md -rw-r--r-- 1.1 KiB
00ecd102Dakota Walsh add license 5 months ago

#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