"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 title, subtitle, URL to open, and a command to execute.
- Timer support: Specify the delay using a human-readable format like
1h10m15s
. - Background execution: Option to run the reminder as a background process.
- Visual feedback: Option to run the reminder visually with a progress bar.
- Python 3.6 or later.
Ensure you have Python 3 installed on your system.
- macOS:
- Homebrew (for installing
terminal-notifier
if not already installed).
- Homebrew (for installing
- Linux:
notify-send
andxdg-utils
packages.
In case, installing all dependencies manually
terminal-notifier
: Install via Homebrew:brew install terminal-notifier
notify-send
: Install via your package manager:sudo apt install libnotify-bin # For Ubuntu/Debian
xdg-utils
: For opening URLs:sudo apt install xdg-utils # For Ubuntu/Debian
Why Python Installation?
- Consistency: Ensures Python is set up correctly and used as a single installation environment.
- Cross-Platform: Adapts easily to macOS and Linux without relying on shell commands.
- Extensibility: Easy to enhance for additional features like user-specific installations.
- Python:
tqdm
package(library) for a progress bar.
- Clone or download the repository containing
reminder.py
andinstall.py
. - Run the installer:
python3 install.py
- Ensure
~/.local/bin
is in yourPATH
:Add the above line to your shell configuration file (export PATH="$HOME/.local/bin:$PATH"
~/.bashrc
,~/.zshrc
, etc.) for persistence.
Run the script with the required options. Below are the available options:
ywfm --title <string> --subtitle <string> --open <URL> --command <string> --timer <string> [--background] [--show-progress]
Option | Description |
---|---|
--title |
Required: Title for the reminder notification. |
--subtitle |
Optional: Subtitle for the notification. |
--open |
Optional: URL to open when the notification is triggered. |
--command |
Optional: Command to execute after the timer ends. |
--timer |
Optional: Timer duration, default 15m (e.g., 1h10m15s , 10s ). |
--background |
Optional: Run the reminder as a background process. |
--show-progress |
Optional: Run the reminder visually with progress bar. |
-
Simple Reminder:
ywfm --title "Time to Work" --subtitle "Start your project" --timer 30m
-
Reminder with URL:
ywfm --title "Check GitHub" --subtitle "Explore the repository" --open "https://github.com" --timer 10s
-
Reminder with Command:
ywfm --title "Hello World" --subtitle "Executing command" --command 'echo "Hello, World!"' --timer 1m
-
Background Reminder:
ywfm --title "Background Task" --subtitle "Running in background" --timer 2h --background
-
Progress bar:
ywfm --title "Break Time" --subtitle "Take a 10-minute break" --timer 10m --show-progress
If you start a reminder with the --background
option, the script prints the process ID (PID). To stop it, use the kill
command:
kill <PID>
- Timer: The program calculates the delay based on the provided timer option and runs until triggered.
- Notifications:
- macOS: Uses
terminal-notifier
to display notifications and open URLs. - Linux: Uses
notify-send
to display notifications andxdg-open
to open URLs.
- macOS: Uses
- Custom Commands: Executes shell commands as specified in the
--command
option. - Visual feedback: Uses
tqdm
Python package to show progress bar.
To remove the script:
-
Delete the installed script:
rm ~/.local/bin/ywfm
-
Optionally, remove the dependencies (
terminal-notifier
orlibnotify-bin
).
Feel free to fork the repository and submit pull requests to improve the script or its documentation.
This project is licensed under the MIT License.
Sanghun Park
Say thank you to past self.
Thank you, past me.
Good job, future me.
Well done, past me.
Your welcome, future me.
Thanks a lot.