Your laptop's personal health guardian. A premium, lightweight desktop application that protects your battery from overcharging and deep discharging.
Most laptop batteries degrade faster when they are pushed to extremes—staying at 100% while plugged in or dropping below 20%. Battery Guardian sits quietly in your background and alerts you exactly when it's time to act.
- 🌍 Cross-Platform: Native support for macOS (
afplay), Windows (winsound), and Linux (aplay). - 🎨 Premium UI: Beautiful, dark-themed macOS-style popups with SF Pro typography.
- 🧠 Smart Alert Logic: No notification spam! The app only alerts you when a threshold is crossed and resets only when the battery return to a safe range.
- 🎵 Audio Alerts: Distinctive sound cues for "Plug In" and "Unplug" notifications.
- 🧵 Performance First: Multithreaded architecture ensures it never slows down your machine.
- Python 3.x
- Tkinter (for the modern GUI)
- psutil (for precise battery monitoring)
- Subprocess (for low-latency audio playback)
git clone https://github.com/your-username/battery-monitor.git
cd battery-monitorEnsure you have Python installed, then run:
pip3 install -r requirements.txtpython3 Batteries.pyThe app is pre-configured with industry-standard healthy thresholds:
- Low Battery Alert: 20% (Red/Orange Warning)
- Full Battery Alert: 98% (Green Notification)
- Check Interval: Every 10 seconds (optimized for battery life)
To customize these, simply edit the constants at the top of Batteries.py.
Batteries.py: The unified core application logic.requirements.txt: Project dependencies.ChargeMe.wav: Alert sound for low battery.Charge-Remove.wav: Alert sound for full battery.
Found a bug or have a design suggestion? We'd love to see it!
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Built with ❤️ to keep your laptop healthy.