Skip to content
/ bwake Public

Tool to remind you to plug out the charger when your device doesn't support setting battery thresholds

Notifications You must be signed in to change notification settings

helium18/bwake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

bwake

image

Why ?

Using your laptop while it's charging is certainly not the best practise.

If your device doesn't support setting thresholds to limit the battery levels while charging and you're looking for something that serves a similar purpose, then you're at the right place.

What it does

Estimates the time required to charge the battery to the given threshold (defaults to 80%).

Then puts your device to sleep (it uses rtcwake behind the scenes).

When the battery charges to the limit specified, the device is woken up and an alarm is played.

Install instructions (?)

git clone https://github.com/helium18/bwake.git
cd bwake
chmod +x bwake

Copy the script to some desired location. Preferably somewhere in the $PATH

Things to note

  1. It's just an estimate, there's a high chance that it'll go above / below the threshold a bit ~ 5%-10%. This can be controlled by setting the precision flag.
  2. Consider running the script with sudo. (To avoid entering the password manually every time before the device is slept)
  3. The alarm should be named sound.ogg and be placed in $HOME. An option to override this behavior will be provided in the future

Feature requests and bug reports are welcome.

About

Tool to remind you to plug out the charger when your device doesn't support setting battery thresholds

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages