kasramp / battery_monitor

Command line battery monitor for Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Battery Monitor

A command line utility to monitor the battery status and notify the user in all open tty sessions about the low battery status.

demo

Build

Make sure you have libacpi installed.

$ sudo apt install libacpi-dev libacpi0

Then run:

$ make

Download

If you want to quickly test the utility without compiling, or have a portable version, go to the release page and download the latest version. After that, give the +x permission to the downloaded file,

$ chmod +x battery_monitor

Keep in mind that the executable is only for x86_64 platform. For other architecture, you need to build manually. See the next step.

Installation

After running the build, run:

$ sudo make install

That installs the battery_monitor utility on your device.

Removal

To uninstall the programm, run:

$ sudo make uninstall

Code Format

The project uses Linux code formatting. To format the code automatically, ensure indent is installed. Then run,

$ make format

Man page

After changing the man page content, run,

$ cd man && man -l battery_monitor.1

To ensure the man page format is correct.

About

Command line battery monitor for Linux

License:GNU General Public License v3.0


Languages

Language:C 89.4%Language:Makefile 10.6%