NoCoffeeInReminder is a simple reminder tool designed to help you remember when to stop drinking coffee. It allows you to set a time for a daily reminder, at which point it will play a sound using ffplay. You can stop the sound at any time by pressing a global hotkey (Alt + F by default).
- Reminder Scheduling: Set a daily reminder time for your caffeine break.
- Sound Notification: Play a sound to remind you to take a break, using ffplay.
- Global Keyboard Listener: Stop the sound at any time with a custom keybind (default is Alt + F).
- Customizable Time: Use a human-readable time (e.g., "8:00 PM") to set the reminder.
- Persistent Settings: Save the reminder time and cron expression in a JSON file (settings.json) for future use.
- Checks FFplay on Startup: Ensures ffplayis available; prints a helpful error and exits if not found.
- Node.js (v16 or higher recommended)
- ffplay (part of ffmpeg, ensure it’s installed and available in your system’s PATH)
- node-global-key-listener (installed automatically via npm install)
- 
Clone or download this repository. 
- 
Install dependencies: npm install 
- 
Ensure ffplayis installed and on your system PATH. For instance:- macOS:
brew install ffmpeg 
- Ubuntu:
sudo apt install ffmpeg 
- Windows: Follow the FFmpeg installation guide.
 
- macOS:
- 
Build/Compile (if using TypeScript): npm run build Or run directly with a TS executor (e.g., ts-nodeortsx):npx tsx src/index.ts 
When the program starts, you’ll see a menu:
- Settings: Set or update the time (e.g., "8:00 PM") for your daily reminder.
- Exit: Terminate the application.
Once set, the reminder will play a sound at the specified time every day. You can stop the sound at any time by pressing Alt + F (or your configured keybind).
- Start the program:
npx tsx src/index.ts 
- Set a reminder time when prompted (e.g., "8:00 PM").
- Wait until the specified time.
- Sound plays via ffplayat the set time.
- Press Alt + F(system-wide) to stop the sound if desired.
- At any time, choose Settings from the menu to update your reminder time or keybind.
- The time is stored in settings.json, along with the generated cron expression.
- src/: Contains the TypeScript source code (entry point:- index.ts).
- assets/: Contains the- nocoffee.pngused in this README.
- settings.json: Holds the user-defined reminder time, cron expression, and stop key combination.
- sound/: Should contain the- sound.mp3(or other audio file) played when the reminder triggers.
- FFplay not found: If the script exits immediately and warns about ffplay, make sure you have FFmpeg installed and thatffplayis accessible on your system PATH.
- Keybind issues: On some systems, “Alt” may be recognized as “Option,” or conflicts might occur with other apps. Try a different combo (e.g., Ctrl+Q).
- Permissions: Ensure you can write to the project folder so that settings.jsoncan be created/updated.
- Fork the repository.
- Create a feature branch (git checkout -b feature/foo).
- Commit your changes (git commit -m 'Add some feature').
- Push to your fork (git push origin feature/foo).
- Create a Pull Request.
All contributions are welcome—bug reports, improvements, or new features.
This project is licensed under the MIT License. See the LICENSE file for more details.
