Skip to content

Get notified on when you need to plug/unplug your charger to preserve battery life.

License

Notifications You must be signed in to change notification settings

SanjaySunil/battery-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



battery-notification

Get notified on when you need to plug/unplug your charger to preserve battery life.

Report Bug · Request Feature



What's battery-notification?

battery-notification is a command-line tool which aims to notify you when your battery is too low, and when you need to unplug your charger when your device is at a sufficient battery level. The command-line tool allows you to set battery percentage thresholds for when you want to be notified, and is straight-forward to use.

Install

$ npm install battery-notification

Usage

$ battery-notification --help

Usage: battery-notification [options]

Get notified on when you need to plug/unplug your charger to preserve battery life.

Options:
  -V, --version       output the version number
  -l, --low <value>   Low battery level threshold
  -h, --high <value>  High battery level threshold

TIP: You can also use the command battery instead of battery-notification.

Running the monitor

$ battery -l <value> -h <value>

Example:

$ battery -l 25 -h 95

NOTE: The threshold values are optional. If a threshold value is not specified, it will fall back to the default threshold value (low percentage warning: 20%, high percentage warning: 80%)


License

Copyright © 2022 Sanjay Sunil ([email protected])

Distributed under the MIT License. See LICENSE for more information.

About

Get notified on when you need to plug/unplug your charger to preserve battery life.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published