A macOS utility that alerts you via WhatsApp when your battery reaches a defined threshold using Twilio.
Project description
⚡ PowerNudge
PowerNudge is a lightweight macOS utility that monitors your MacBook's battery percentage and sends you a WhatsApp alert via Twilio when it reaches a predefined charging level — so you can unplug and prolong battery health.
Built with automation in mind, it’s perfect for users who want a hands-free way to monitor charging without keeping an eye on the battery all the time.
🚀 Features
- 🔋 Monitors battery percentage using macOS's
pmsetcommand - 📤 Sends a WhatsApp message via Twilio when a threshold is reached
- 🧪 Built-in Twilio credential validation
🛠 Requirements
- Python 3.12+
- macOS (uses
pmsetfor battery info) - Twilio Account with WhatsApp sandbox enabled
- Internet connection to send WhatsApp message
📦 Installation
Install dependencies:
pip install power_nudge
🧠 How It Works
- Reads your battery percentage via
pmset -g batt - Sends a WhatsApp alert if the threshold is reached
🧪 Usage
python src/power_nudge/main.py
Or, schedule it with a cron job or launchd to run periodically.
📬 Example Alert
🟢 Battery is 90%. Please unplug the charger!
📄 License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file power_nudge-0.1.0.tar.gz.
File metadata
- Download URL: power_nudge-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.9.22 Linux/6.11.0-1012-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b5a263ce54ec776f2bbffbc793aaf958322864f4d9ef2b2e7ec85b01366682
|
|
| MD5 |
34e6dde2dffbd257c458022693c232f7
|
|
| BLAKE2b-256 |
41ee4b46231bc6f15bce7ad8f866fe7064887a10c8279e4781a7e48a832bdb1e
|
File details
Details for the file power_nudge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: power_nudge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.9.22 Linux/6.11.0-1012-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b73f2c7b13e8095ec9a57382dbd7e42f7b5f5ad3113522d328de2daa96dd784c
|
|
| MD5 |
38aa2399c5aff19dab274363f44af6df
|
|
| BLAKE2b-256 |
aacd28dc61264d68256a2dc55bf607fbf9732f5b00066d55e8fce91842a05d89
|