Skip to content

Get notification when your laptop battery is almost full or empty

License

Notifications You must be signed in to change notification settings

anuphw/BatteryProtector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

BatteryProtector

Get notification when your laptop battery is almost full or empty

I recently had to change my laptop battery because it was swolen. One of the main reasons for it that I never unplug the charger. So I created a telegram bot to notify me when the battery is almost full or empty.

I created a cronjob that runs the bot script whenever my laptop restarts.

Installation:

git clone https://github.com/anuphw/BatteryProtector.git
cd BatteryProtector
python -m venv venv
source venv/bin/activate
pip install telebot
python battery_bot.py

Set up cronjob

crontab -e

Create a new cronjob like the following

@reboot <path-to-python> <path-to-battery_bot.py>

for example

@reboot /home/anup/BatteryProtector/venv/bin/python /home/anup/BatteryProtector/battery_bot.py

About

Get notification when your laptop battery is almost full or empty

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages