Coder Social home page Coder Social logo

bwake's Introduction

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.

bwake's People

Contributors

helium18 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.