Skip to content

FyeCobain/BatteryMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battery Monitor

Version 7.3

A Python script for Windows that monitors and controls the laptop's battery percentage, optionally with a smart plug, preventing it from getting too low or too high, thus helping to extend battery life. It works as an icon in the system tray.

Requirements

pip install pynput simplesystray

Usage

To configure the script edit the config.ini file

  • You can set a domain to ping. Useful for gaming.

  • If the hibernation hotkey is set to True, you can hibernate your computer by pressing Windows + Insert. If yo want to hibernate without the hibernation sound, use Windows + Shift + Insert.

  • You can set two URLs so that the script makes a GET request when the percentage is less than the minimum or greater than the maximum allowed. Intended to set up an IFTTT webhook to turn ON/OFF a smart plug.

  • You can set a Kasa username, password and device name (the one set in the Kasa app) for the same result.

If no ON/OFF URLs and no Kasa device are set, the script will play a sound when the battery needs to be connected or disconnected.

  • You can open the script and pass it the path to a file. Closing the script will open that file. Intended to open the script from an application that needs to be closed and will be reopened when the user exits the script.
batterymonitor.pyw "C:\OpenWhenClosing.exe"

Attributions

Icons

Plug icons created by Pixel perfect - Flaticon

Sounds

Piano Notification 2 by FoolBoyMedia | License: Attribution NonCommercial 4.0

Piano Notification 3 by FoolBoyMedia | License: Attribution NonCommercial 4.0

Piano Notification 5b by FoolBoyMedia | License: Attribution NonCommercial 4.0

About

Windows battery monitor to extend battery lifetime

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages