Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kasramp/battery_monitor
Command line battery monitor for Linux
https://github.com/kasramp/battery_monitor
Last synced: about 1 month ago
JSON representation
Command line battery monitor for Linux
- Host: GitHub
- URL: https://github.com/kasramp/battery_monitor
- Owner: kasramp
- License: gpl-3.0
- Created: 2024-02-19T22:39:40.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-03-19T19:32:53.000Z (8 months ago)
- Last Synced: 2024-05-02T02:12:56.655Z (7 months ago)
- Language: C
- Size: 1.02 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://raw.githubusercontent.com/kasramp/battery_monitor/master/assets/demo.gif)
## Build
Make sure you have `libacpi` installed.
```bash
$ sudo apt install libacpi-dev libacpi0
```Then run:
```bash
$ make
```## Download
If you want to quickly test the utility without compiling, or have a portable version, go to [the release page](https://github.com/kasramp/battery_monitor/releases) and download the latest version.
After that, give the +x permission to the downloaded file,```bash
$ 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:
```bash
$ sudo make install
```That installs the `battery_monitor` utility on your device.
## Removal
To uninstall the programm, run:
```bash
$ sudo make uninstall
```## Code Format
The project uses Linux code formatting. To format the code automatically, ensure `indent` is installed. Then run,
```bash
$ make format
```## Man page
After changing the man page content, run,
```bash
$ cd man && man -l battery_monitor.1
```To ensure the man page format is correct.