Leaving the battery plugged in when FULLY-CHARGED will reduce its useful life.
That is, the maximum capacity of the battery will decline, thereby making a "full charge" refer to a state with less energy than a "full charge" previously denoted. Note, however, that in general a lithium ion's battery life is measured in "charge cycles." This term refers to the charging and discharging of the battery; that is, do each of these once, and that is one "charge cycle."
Thus, in order to maximize the length of time over which your battery remains able to hold enough of a charge to be useful, I would suggest minimizing the time that the battery remains plugged in while fully charged. While constantly discharging and recharging fully would be better than leaving the battery plugged in, the better treatment is to not have the battery plugged in.
To notify User about the battery when it exceeds a certain limit or deceeds certain limit to Save Battery Life
https://github.com/jsuryakt/save-battery/blob/master/Battery_Assistant.py
This Python file contains the actual code to check if the battery is exceeding a certain limit or not and also the tkinter code for the window.
"Location where your Python executable exists" "Location where your Python script is saved"
pause
Example:-
"C:\Users\Jayasurya\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe" "C:\Users\Jayasurya\Desktop\Battery Assistant\Battery_Assistant.py"
pause
Example:- Battery_Assistant.bat
https://github.com/jsuryakt/save-battery/blob/master/Battery_Assistant.bat
Now run and check if the .bat file executes.
Okay, now if everything is fine, we can continue to create a VBScript file, so that we don't have to run the batch file everytime and make the Batch window invisible. VBScript will be silently running in the background.
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "Location of batch file" & Chr(34), 0
Set WshShell = Nothing
Example:-
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Users\Jayasurya\Desktop\Battery Assistant\Battery_Assistant.bat" & Chr(34), 0
Set WshShell = Nothing
Example:- Battery_Assistant.vbs
https://github.com/jsuryakt/save-battery/blob/master/battery_assistant.vbs
Now, we have our VBScript, but everytime we restart the computer we have to run the script again. To overcome this problem, we have a simple solution.
2. Click Windows + R, Run window will popup and enter shell:startup and hit on Enter. A new window should popup.
Voila, Battery Assistant will be up and running everytime you start the system without having to run the script.
Follow these steps:
- Fork the project.
- Create a new branch.
- Make your changes and write tests when practical.
- Commit your changes to the new branch.
- Send a pull request.