A script to sync your personal calendar to your work calendar with "Busy" blocks, preserving privacy.
- 🔒 Privacy-preserving: Only syncs "Busy" blocks, no personal event details
- 🌍 Travel-friendly: Uses fixed work timezone regardless of where you create events
- ⚡ Fast: Handles thousands of events efficiently using EventKit
- 🥷 Stealth mode: Uses Cyrillic "Вusy" to distinguish from manual "Busy" events
- 📅 Smart overlap detection: Handles multi-day and recurring events
- 🔄 Bidirectional: Creates missing events AND removes outdated ones
-
Download the script:
curl -O https://raw.githubusercontent.com/welpo/busy/main/busy chmod +x busy
-
Edit configuration (top of script):
PERSONAL_CALENDAR = "Personal" # Your personal calendar name WORK_CALENDAR = "Work" # Your work calendar name WORK_TIMEZONE = "America/New_York" # Your work timezone WORK_START = "09:00" # Work start time WORK_END = "17:30" # Work end time SKIP_MULTIDAY_EVENTS = False # Skip events spanning multiple days
To figure out your computer's timezone, visit dst.osc.garden and check the footer for your timezone string (e.g. "Europe/London").
-
Run it:
./busy --dry-run # Preview changes ./busy # Actually sync
You can schedule syncs with cron or launchd. Example to sync every 20 minutes, in crontab -e:
*/20 * * * * /path/to/busy >> /path/to/busy.log 2>&1- Reads your personal calendar for upcoming events (next 2 weeks by default)
- Filters events that overlap with your work hours in your work timezone
- Creates "Busy" events in your work calendar for those time slots
- Removes old "Busy" events that no longer have corresponding personal events
- macOS with Calendar.app
uv(see Getting Started with uv)- Calendar access permission (system will prompt)
./busy --dry-run # Preview changes without making them
./busy --weeks 3 # Sync 3 weeks ahead instead of default 2
./busy --help # Show configuration and helpQ: What if I manually add "Busy" blocks to my work calendar?
A: You can change the AUTO_BUSY_TITLE constant to something else (e.g. "Work Busy") to avoid conflicts. By default, it uses "Вusy" (Cyrillic B) to distinguish from manual "Busy" events.
Q: Does this work across timezones when travelling?
A: Yes! Events are always compared against your fixed work timezone, so creating an event in Tokyo at 6 PM will sync if it falls during your NY work hours.
Q: What about all-day events?
A: All-day events will create "Вusy" blocks for the entire day (not just work hours).
Q: What about multi-day events (vacations, travel)?
A: By default, multi-day events are synced and create busy blocks for their entire duration. Set SKIP_MULTIDAY_EVENTS = True to skip these events entirely.
Q: Is it safe to run multiple times?
A: Yes, it's idempotent. Running it again will only sync changes since the last run.
"Calendar 'X' not found": Check your calendar names in Calendar.app and update the constants.
Permission denied: Grant Calendar access when prompted by macOS.
Wrong timezone: Verify WORK_TIMEZONE matches your work location (e.g. "America/New_York", "Europe/London").
This script is free software: you can redistribute it and/or modify it under the terms of the GNU general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.