diff --git a/README.md b/README.md index e8afce8..1c5e379 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,60 @@ -# reminder +# Reminder Script + +This script allows you to set reminders from the command line on a Linux system. It uses the `notify-send` command to display pop-up notifications and the `at` command to schedule these notifications at specified times. + +## Features + +- Set reminders with custom messages. +- Schedule reminders for specific times or intervals. +- Display notifications as pop-ups on your desktop. + +## Requirements + +- `libnotify-bin` package for `notify-send` command. +- `at` command for scheduling tasks. + +## Installation + +1. **Clone the Repository**: + Clone this repository to your local machine: + ```bash + git clone + cd + ``` + +2. **Install Necessary Packages**: + Ensure you have the `libnotify-bin` package installed. For Fedora, you can install it using: + ```bash + sudo dnf install libnotify + ``` + +3. **Make the Script Executable**: + Make the script executable by running: + ```bash + chmod +x remind.sh + ``` + +## Usage + +- **Set a Reminder**: + Use the script to set reminders with a message and time. For example: + ```bash + ./remind.sh "Time to take a break" in 5 minutes + ``` + +- **Set a Reminder for a Specific Time**: + ```bash + ./remind.sh "Meeting starts" at 14:00 + ``` + +- **Immediate Reminder**: + ```bash + ./remind.sh "Check emails" now + ``` + +## Notes + +- Ensure your desktop environment's notification system is enabled. +- The `at` command must be running on your system to schedule tasks. + -A simple script to set a reminder on Linux using libnotify \ No newline at end of file diff --git a/remind.sh b/remind.sh new file mode 100755 index 0000000..a34b25c --- /dev/null +++ b/remind.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +function remind() { + local COUNT="$#" + local COMMAND="$1" + local MESSAGE="$1" + local OP="$2" + shift 2 + local WHEN="$@" + + # Display help if no parameters or help command + if [[ $COUNT -eq 0 || "$COMMAND" == "help" || "$COMMAND" == "--help" || "$COMMAND" == "-h" ]]; then + echo "Usage: remind