Skip to content

Python script to check battery levels & NTFY for notifications

License

Notifications You must be signed in to change notification settings

Samsim3/Laptop-Battery-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Laptop-Battery-Monitor

Python script to check battery levels & NTFY for notifications

This is a python script created as a project with assistance of ChatGPT. This script checks your battery level and lets you know if the battery gets below 20% or is fully charged and should be unplugged using NTFY or terminal output when run manually.

To use the NTFY features update the Ntfy configuration variables with the URL target location and topic.

To have the script run every 5 minutes in Linux run the following:

  • Download the py file and move to your script location
  • sudo mv battery-check.py /usr/local/bin/
  • sudo chmod +x /usr/local/bin/battery-check.py
  • crontab -e

Add the following line for the script to run every 5 minutes

  • */5 * * * * /usr/bin/python3 /usr/local/bin/battery-check.py

About

Python script to check battery levels & NTFY for notifications

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages