A simple cross-platform command-line notification tool ⏰🔔, plus a lightweight single-header library notify.h for integration in your own projects.
- Desktop notifications
- Timed reminders with flexible duration syntax
- Optional audio playback (custom file or system bell)
- Cross-platform:
- Linux (via
notify-send) - macOS (via
osascript) - Windows (via
MessageBox)
- Linux (via
Perfect for break timers, lightweight reminders, or automating alerts directly from the terminal.
gcc build.c -o build
./build
# Example output:
CMD: mkdir bin
CMD: gcc -O2 main.c -o bin/notify
MSG: Saved binary to './bin'This compiles notify and saves the binary to the bin/ folder.
# Notify in 45 minutes
./bin/notify 45m "Rest, it is time to rest my friend."NOTE: Quotes around the message are optional.
# Notify in 1 hour 5 minutes and play audio.wav
./bin/notify audio.wav 1h5m "Rest, it is time to rest my friend."- Supports
s(seconds),m(minutes),h(hours), or combinations:1h5m15s90m45s
- Message → displayed in a native notification popup.
- Audio file → plays if provided (
.wavrecommended). - No file found → falls back to system bell sound.
For easier access, copy the binary into your $PATH:
sudo cp bin/notify /usr/local/bin/Now you can simply run:
notify 30m "Stretch your legs!"This project also includes notify.h — a single-header library for embedding notifications in your own C projects.
/**
* Cross-platform notification function. Uses system notification center to push messages.
* @param source notification source. Default: "App".
* @param title title of notification. Default: "Notification".
* @param message notification description. Default: "".
* @returns 0 on success, -1 on failure
*/
extern int ntf_notify(const char *source, const char *title, const char *message);/**
* Cross-platform bell function that plays system notification sound or custom WAV file.
* @param audio_file Path to WAV audio file. If NULL or file doesn't exist, plays default system bell.
* @returns 0 on success, -1 on failure
*/
extern int ntf_beep(const char *audio_file);👉 Command-line utility source code is in main.c.
MIT.