🔋 A simple library that alerts you when your battery is low.
Usage: battery-alert [remaining] [command]
remaining
- The % battery remaining required to trigger the command
command
- The command to trigger (required)
$ npm install -g battery-alert
$ battery-alert 15 vlc -R /absolute/path/to/alert.wav
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.
Licensed under the MIT license.