Set Up gcal-notifier — Simple Step-by-Step Guidegcal-notifier is a lightweight tool that shows desktop notifications for upcoming Google Calendar events. It’s ideal if you want concise, local reminders without opening a browser. This guide walks you through installation, configuration, customization, and troubleshooting on Linux and macOS. Commands and examples assume a basic familiarity with the terminal.
What gcal-notifier does (brief)
gcal-notifier periodically polls Google Calendar and shows desktop notifications for events that match your configured calendars and time window. It supports multiple calendars, event filtering, and custom notification templates.
Prerequisites
- A Google account with access to the calendars you want to monitor.
- Basic terminal/command-line experience.
- For macOS or Linux: a desktop notification service (libnotify on Linux, built-in notifications on macOS).
- Python 3.7+ (only if using versions or forks that require Python) — many gcal-notifier distributions are standalone binaries; check the specific release you choose.
Installation
There are multiple ways to install gcal-notifier: packaged binaries, Homebrew (macOS), or building from source. Choose the method that fits your OS and preferences.
1) Install via Homebrew (macOS)
If you use Homebrew, try:
brew install --cask gcal-notifier
If no official cask exists or it’s unavailable, use the binary release below.
2) Download prebuilt binary (Linux/macOS)
- Visit the gcal-notifier releases page on the project’s repository (GitHub or similar).
- Download the appropriate binary for your OS and architecture (e.g., gcal-notifier-linux-amd64).
- Make it executable and move it to a directory in your PATH:
chmod +x gcal-notifier sudo mv gcal-notifier /usr/local/bin/
3) Build from source
If you prefer building:
- Clone the repo:
git clone https://github.com/username/gcal-notifier.git cd gcal-notifier
- Follow build instructions in README (often Go or Node or Python build steps). For Go projects:
go build sudo mv gcal-notifier /usr/local/bin/
Initial run & authentication
gcal-notifier needs permission to read your Google Calendar. The first run typically opens a browser window to authorize access.
- Run:
gcal-notifier
- The tool should print an authorization URL. Open it in your browser.
- Sign in with your Google account and allow the requested calendar scope (read-only access is usually sufficient).
- You’ll receive a code or the app will finish auth automatically; follow the on-screen steps. The token is stored locally (often in ~/.config/gcal-notifier or ~/.gcal-notifier).
Note: If the binary is headless or running on a remote server, follow the device/console authorization instructions provided by the tool (copy-paste code flow).
Configuration
gcal-notifier typically reads a config file (common locations: ~/.config/gcal-notifier/config.yml or ~/.gcal-notifier.json). The format depends on the implementation; examples below show common options.
Example YAML config (adjust keys to match your version):
# ~/.config/gcal-notifier/config.yml calendars: - primary - [email protected] notify_before: 15 # minutes before event to notify poll_interval: 60 # seconds between checks max_events: 10 # how many upcoming events to fetch time_format: "15:04" # display format for times date_format: "2006-01-02" # if used show_location: true show_description: false timezone: "local" notification_command: "" # optional: custom command to run for notifications
Common options explained:
- calendars: list of calendar IDs (use “primary” for your main calendar).
- notify_before: how many minutes before an event to show a notification.
- poll_interval: how often the tool checks Google Calendar.
- max_events: number of upcoming events fetched per check.
- show_location / show_description: include these fields in notifications.
- notification_command: a custom script/command to run instead of using desktop notifications.
To find calendar IDs, use Google Calendar web UI settings for each calendar — the calendar’s ID is shown under “Integrate calendar”.
Running as a background service
To keep gcal-notifier always running, run it as a systemd service (Linux) or a LaunchAgent (macOS).
systemd (Linux)
Create a unit file: /etc/systemd/system/gcal-notifier.service
[Unit] Description=gcal-notifier [Service] Type=simple ExecStart=/usr/local/bin/gcal-notifier --config /home/youruser/.config/gcal-notifier/config.yml User=youruser Restart=on-failure [Install] WantedBy=default.target
Enable and start:
sudo systemctl daemon-reload sudo systemctl enable --now gcal-notifier
LaunchAgent (macOS)
Create plist at ~/Library/LaunchAgents/com.yourname.gcal-notifier.plist with proper ProgramArguments and RunAtLoad keys. Then:
launchctl load ~/Library/LaunchAgents/com.yourname.gcal-notifier.plist
Notification customization
gcal-notifier supports templates or custom notification commands.
- Template example (if supported):
"{start_time} — {summary} ({calendar})"
- Custom command: use a script to display richer notifications (images, action buttons) or forward events to other apps (Slack, IRC).
Example custom notify script (Linux, using notify-send):
#!/bin/bash title="$1" message="$2" notify-send "$title" "$message" -a "gcal-notifier" -u normal
Set notification_command in config to the script path.
Filtering and advanced options
- Filter by keyword in event title or description (some versions support regex filters).
- Exclude all-day events or specific calendars.
- Set different notify_before per calendar by running multiple instances with separate configs.
- Use the API’s calendar colors to style notifications (client-side).
Troubleshooting
- No notifications: ensure a notification daemon is running (libnotify, notify-osd, macOS Notification Center). Test with notify-send (Linux) or osascript (macOS).
- Authentication errors: delete stored token and reauthorize. Tokens often in ~/.config/gcal-notifier/token.json.
- Timezone issues: ensure your system timezone matches the calendar timezone or set timezone explicitly in config.
- Rate limits: increase poll_interval to avoid hitting Google API limits.
Commands to test notification on Linux:
notify-send "Test" "If you see this, notifications work"
On macOS:
osascript -e 'display notification "If you see this, notifications work" with title "Test"'
Security & privacy considerations
- gcal-notifier typically requests read-only calendar access; prefer that scope.
- Store tokens in a secure, user-only readable location (default locations are usually fine).
- If running on a shared machine, consider running under a dedicated user account or set file permissions to restrict token file access.
Example: Minimal setup walkthrough (quick)
- Download binary and place in /usr/local/bin.
- Run
gcal-notifier
and complete OAuth in your browser. - Create config at ~/.config/gcal-notifier/config.yml with: “`yaml calendars:
- primary notify_before: 10 poll_interval: 60 max_events: 5 “`
- Start gcal-notifier in background or as systemd/LaunchAgent.
Alternatives and integrations
- Use native Google Calendar app or web notifications for tight integration.
- other tools: icalBuddy (macOS), khal + vdirsyncer (terminal), or custom scripts using Google Calendar API.
- Forward notifications to chat services (Slack, Matrix) via webhook using a custom notification_command script.
Conclusion
gcal-notifier is a small, effective way to surface Google Calendar events as native desktop notifications. Install the binary or build from source, authorize access, configure your calendars and notification preferences, and run it as a background service for continuous reminders. If you run into issues, check notification daemon status, reauthorize tokens, and adjust polling intervals.
If you want, tell me your OS and whether you prefer a binary or Homebrew/install-from-source — I’ll give exact commands and a ready-to-use config file.
Leave a Reply