The battery_status.py file is a Python script that monitors your computer's battery status and provides audio alerts. Here's what it does:
This is a battery monitoring utility that runs continuously in the background and alerts you when:
- Your battery is getting low (below 30%) and needs charging
- Your battery is highly charged (above 90%) and should be unplugged
To get this running locally, please follow the steps below:
- Install python.
- Install the dependencies of this project by running the following commands:
pip install psutilpip install pyttsx3
- Test it via running locally:
python battery_status.py
To get this running as a background app. during the windows/system start, please follow the steps below:
- Convert this into an executable file.
- To do that, Install PyInstaller
pip install pyinstaller
- Run the PyInstaller Command
pyinstaller --onefile --noconsole battery_status.py
- Find Your Executable inside the
distfolder. - In case u want this
battery_status.exeto run every time you start Windows, then navigate to the Startup folder: Typeshell:startupinto the Run dialog box and pressEnter. This will open the Startup folder for your current user account. - Drag and drop this
exeinto the Startup folder window you opened.
That's it! The next time you log in, the program will automatically start.