Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/risto-stevcev/battery-alert

:battery: A simple library that alerts you when your battery is low
https://github.com/risto-stevcev/battery-alert

alert battery

Last synced: 8 days ago
JSON representation

:battery: A simple library that alerts you when your battery is low

Awesome Lists containing this project

README

        

# battery-alert
:battery: A simple library that alerts you when your battery is low.

## Usage

`Usage: battery-alert [remaining] [command]`

`remaining` - The % battery remaining required to trigger the command
`command` - The command to trigger (required)

```bash
$ npm install -g battery-alert
$ battery-alert 15 vlc -R /absolute/path/to/alert.wav
```

## Implementation

The library uses ACPI to get battery info for Battery 0 and then spawns the command given by the user. It checks the ACPI status in 1 minute intervals.

## License

Licensed under the MIT license.