A beautiful animated desktop water reminder built with Python and PySide6.
Project description
๐ง Water Companion
Your beautiful, animated desktop hydration reminder
A polished open-source desktop application that gently reminds you to drink water โ with a cute animated mascot drawn entirely in code.
โจ Features
- ๐จ Animated Water-Drop Mascot โ Drawn 100% with
QPainter. No images, no assets. Blinking eyes, floating animation, smiling when you drink, sad when you skip. - ๐ Smart Reminders โ Configurable intervals from 5 minutes to 2 hours.
- ๐ซ Particle Effects โ Hearts & sparkles fly when you drink. Sad rain drops fall when you skip.
- ๐ฅ๏ธ System Tray โ Lives quietly in your tray. Pause, resume, or change interval without opening the window.
- ๐ป Full CLI โ Control everything from your terminal with
water-companioncommands. - ๐ Offline-First โ Settings stored locally in JSON. No cloud, no account, no internet.
- ๐ PyPI-Ready โ Install with a single
pip installcommand. - ๐ฆ Standalone Binary โ Build a
.exewith PyInstaller.
๐ Quick Start
Install from PyPI
pip install water-companion
water-companion
That's it! The app launches, shows the setup window, and quietly moves to your system tray.
Install for Development
git clone https://github.com/yourusername/water-companion
cd water-companion
pip install -e ".[dev]"
water-companion
๐ป CLI Reference
water-companion Launch the app (default)
water-companion start Launch the app
water-companion stop Stop the running instance
water-companion pause Pause reminders
water-companion resume Resume paused reminders
water-companion status Show current state and next reminder
water-companion config Interactively change the interval
water-companion reset Reset all settings to defaults
water-companion version Print version
Examples
# Check if it's running and when the next reminder fires
water-companion status
# Pause while you're in a meeting
water-companion pause
# Come back after the meeting
water-companion resume
# Change to every 15 minutes
water-companion config
๐ฎ How It Works
- Launch โ Run
water-companionfrom terminal or double-click. - Setup โ Choose your reminder interval (5 min to 2 hours).
- Click "Start" โ App minimises to system tray. Timer begins.
- Reminder fires โ Animated water drop slides in from the bottom-right corner.
- Respond:
- Yes โ โ Drop smiles โ Hearts & sparkles fly โ Timer restarts
- No โ โ Drop looks sad โ Sad drops fall โ Timer restarts
๐๏ธ Architecture
water_companion/
โโโ main.py # App controller + IPC server
โโโ cli.py # Typer CLI
โโโ core/
โ โโโ reminder_manager.py # QTimer state machine (IDLE/RUNNING/PAUSED)
โ โโโ messages.py # Encouragement + gentle reminder text
โโโ mascot/
โ โโโ water_drop_widget.py # QPainter mascot (no assets)
โ โโโ animations.py # Slide, float, particle animations
โโโ ui/
โ โโโ setup_window.py # First-run setup window
โ โโโ reminder_window.py # Animated reminder popup
โ โโโ tray_manager.py # System tray icon + menu
โ โโโ styles.py # QSS design system
โโโ settings/
โ โโโ config.py # JSON config (load/save/reset)
โโโ utils/
โโโ constants.py # App-wide constants
โโโ logger.py # Rotating file + console logger
Design principles:
- SOLID โ each class has one responsibility
- Qt Signals/Slots โ zero tight coupling between UI and logic
- No global state โ everything passes through the controller
- Clean Architecture โ UI, core, and data layers are fully independent
๐งช Running Tests
pip install pytest pytest-qt
pytest tests/ -v
Expected output:
tests/test_config.py โ 10 passed
tests/test_reminder_manager.py โ 12 passed
tests/test_messages.py โ 6 passed
๐ฆ Building a Standalone Binary (Windows)
pip install pyinstaller
pyinstaller build.spec
The binary will be at dist/water-companion/water-companion.exe.
๐ค Publishing to PyPI
pip install build twine
python -m build
twine upload dist/*
โ๏ธ Configuration
Settings are stored at ~/.water-companion/config.json:
{
"interval_minutes": 30,
"reminders_enabled": true,
"first_run": false
}
Logs are at ~/.water-companion/app.log (rotating, max 6 MB).
๐ ๏ธ Requirements
| Dependency | Version | Purpose |
|---|---|---|
| Python | 3.12+ | Language |
| PySide6 | 6.7+ | GUI framework |
| Typer | 0.12+ | CLI |
| Rich | 13.7+ | CLI formatting |
๐ค Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes with tests
- Run
pytest tests/ -v - Submit a pull request
๐ License
MIT ยฉ Water Companion Contributors
Project details
Release history Release notifications | RSS feed
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 water_companion-1.0.0.tar.gz.
File metadata
- Download URL: water_companion-1.0.0.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08f574b5f50c521c896586727f2155d1b89f6635d71cd0edab3d77f213f17e78
|
|
| MD5 |
9e55473068095806ca8dfc70acb76010
|
|
| BLAKE2b-256 |
a13d46c5f12ede9a5b4f76ff621ea41e73791f2706a4bd7bc288fad81996c869
|
File details
Details for the file water_companion-1.0.0-py3-none-any.whl.
File metadata
- Download URL: water_companion-1.0.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa4b5e5bcd72ca55771e4f4bf5d03e0320bb0d43c35ac0bb9e92a976bf87ff4
|
|
| MD5 |
62e794e7126c5eafc7066db6e04eaf83
|
|
| BLAKE2b-256 |
221529c3e2a0d86dc307292360bb158aba3245362221b8a0a76022d5b4bd904d
|