Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/risto-stevcev/battery-alert
- Owner: Risto-Stevcev
- License: mit
- Created: 2016-02-28T15:35:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-28T16:05:53.000Z (almost 9 years ago)
- Last Synced: 2024-12-25T13:09:25.677Z (16 days ago)
- Topics: alert, battery
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/battery-alert
- Size: 215 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.