"Do something today that your future self will thank you for."
A simple Python3-based reminder tool for macOS and Linux that uses native notification systems to alert the user after a specified time. It also supports opening URLs and executing commands when the timer ends.
- Cross-platform: Works on macOS (using
terminal-notifier) and Linux (usingnotify-send). - Customizable notifications: Add a subject, message, URL to open, and a command to execute.
- Timer support: Specify the delay using a human-readable format like
1h10m15s. - Visual feedback: Option to run the reminder visually with a progress bar.
- Background execution: Option to run the reminder as a background process with logging.
- Named reminders: Assign names to reminders for easier management.
- Reminder management: List active reminders and cancel them by PID or name.
- Dry run mode: Preview reminder configuration without executing.
- JSON output: Outputs reminder details in JSON format.
- Minimum time limit: Enforces a minimum time of 15 seconds for all reminders.
- Default messages: Provides friendly default messages if none specified.
- Logging: Stores background process logs in
~/.local/state/ywfm/.
- Python 3.8 or later
tqdmpackage for progress bar visualization
- macOS:
terminal-notifierfor notifications- Homebrew (recommended for installing dependencies)
- Linux:
notify-send(libnotify-bin) for notificationsxdg-utilsfor opening URLs- Supported package managers: apt, dnf, yum, pacman, zypper
The installer script (install.py) handles all dependencies and setup:
-
Clone or download the repository
-
Run the installer:
python3 install.py
The installer will:
- Check for missing system dependencies
- Auto-detect your package manager (apt, dnf, pacman, etc.)
- Prompt before installing any missing dependencies
- Install required Python packages
- Set up the executable in your PATH
Note: You may need:
- macOS: Homebrew installed (https://brew.sh)
- Linux: sudo privileges for package installation
-
The installer will guide you through adding the following to your PATH:
export PATH="$HOME/.local/bin:$PATH"
Add this to your shell config file (
~/.bashrc,~/.zshrc, etc.) for persistence.
Click to expand manual installation steps
-
Check system dependencies:
- macOS:
which terminal-notifier - Linux:
which notify-send xdg-open
- macOS:
-
Check Python packages:
python3 -m pip show tqdm
-
macOS:
brew install terminal-notifier
-
Linux (choose your distribution):
# Debian/Ubuntu sudo apt install -y libnotify-bin xdg-utils # Fedora/RHEL sudo dnf install -y libnotify xdg-utils # Arch Linux sudo pacman -S libnotify xdg-utils # openSUSE sudo zypper install -y libnotify-tools xdg-utils
- Install required package:
python3 -m pip install --user tqdm
-
Create installation directory:
mkdir -p ~/.local/bin -
Make script executable and install:
chmod +x main.py cp main.py ~/.local/bin/ywfm -
Add to PATH (if not already added):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc source ~/.bashrc # or ~/.zshrc
ywfm [-h] [-l | --cancel PID_OR_NAME] [-n NAME] [-s SUBJECT] [-m MESSAGE] -t TIMER [-o OPEN_URL] [-c COMMAND] [-p] [-b] [--dry-run]| Option | Description | Default |
|---|---|---|
-l --list |
List all active background reminders | - |
--cancel PID_OR_NAME |
Cancel a reminder by PID or name | - |
-n --name |
Name for the reminder (for easier cancel) | None |
-s --subject |
Subject for the reminder notification | "ywfm" |
-m --message |
Message for the notification | Random* |
-t --timer |
Timer duration (e.g., 1h10m15s, 10s) |
Required |
-o --open-url |
URL to open when notification triggers | None |
-c --command |
Command to execute after timer ends | None |
-p --show-progress |
Show progress bar | False |
-b --background |
Run as background process | False |
--dry-run |
Preview configuration without executing | False |
* Default messages alternate between "Well done!" and "You're welcome!"
-
Simple Reminder:
ywfm -t 30m -s "Time to Work" -m "Start your project"
-
Open URL on Timer:
ywfm -t 10s -s "Check GitHub" -m "Review PRs" -o "https://github.com"
-
Execute Command:
ywfm -t 1m -s "Build" -c 'make clean && make'
-
Named Background Reminder:
ywfm -t 2h -s "Long Task" -n mytask -bOutput:
{ "pid": 12345, "params": { "name": "mytask", "subject": "Long Task", "message": "Well done!", "duration": "2h", "url": null, "command": null, "show-progress": false, "background": true }, "info": { "created_at": "2024-03-21_14:30:00", "trigger_at": "2024-03-21_16:30:00", "seconds": 7200 }, "extra": { "os_name": "Darwin", "machine": "x86_64", "node": "Sanghun.local", "platform": "macOS-14.7-x86_64-i386-64bit", "description": "Logs stored in '~/.local/state/ywfm'" } } -
Progress Bar:
ywfm -t 10m -s "Break" -m "Coffee time!" -p
-
Preview with Dry Run:
ywfm -t 1h30m -s "Meeting" --dry-run
When running in background mode (-b):
- Process ID (PID) is output in JSON format
- Logs are stored in
~/.local/state/ywfm/:output_[timestamp].log: Standard outputerror_[timestamp].log: Error messages[timestamp].json: Reminder configurationywfm.pid: Current process PID
ywfm --listOutput:
PID Name Subject Trigger At Duration
--------------------------------------------------------------------
12345 mytask Long Task 2024-03-21_16:30:00 2h
12346 - Break 2024-03-21_14:45:00 30m
By PID:
ywfm --cancel 12345By name:
ywfm --cancel mytaskLegacy method (still works):
kill $(cat ~/.local/state/ywfm/ywfm.pid)-
Remove the executable:
rm ~/.local/bin/ywfm -
Optional: Remove log directory:
rm -rf ~/.local/state/ywfm -
Optional: Remove dependencies:
- macOS:
brew uninstall terminal-notifier - Linux:
sudo apt remove libnotify-bin xdg-utils
- macOS:
Feel free to fork the repository and submit pull requests for improvements.
This project is licensed under the MIT License.
Sanghun Park
Thank you, past me.
Good job, future me.
Well done, past me.
You're welcome, future me.
Thanks a lot.