batmon

command module
v0.0.0-...-a4d12fb Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 9 Imported by: 0

README

batmon

Basic Golang program to monitor battery charge level


batmon is a basic utility designed to be in the background of a system to monitor its battery level. Only Linux is supported.

Installation

The following requires at least version 1.16 of the Go SDK installed, and to have GOPATH on your PATH.

go install github.com/codemicro/batmon@latest
Usage

Start at startup, for example with cron:

@reboot /home/akp/go/bin/batmon

Note that batmon is blocking.

Battery information

Battery capacity is retrieved from /sys/class/power_supply/BAT0/capacity by default. This can be changed in the batteryPath constant in main.go.

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