aboutsummaryrefslogtreecommitdiff
path: root/calendar-sync.local.el.example
blob: ba84603b227def7cb2e8dd4d683f1f0e55eb32cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;;; calendar-sync.local.el.example --- Template for private calendar config -*- lexical-binding: t; -*-

;; Copy this file to `calendar-sync.local.el' (sibling of init.el) and
;; replace the placeholder URLs with your actual private ICS feed
;; addresses. The real file is gitignored; the template is tracked.
;;
;; How it works:
;; - `modules/calendar-sync.el' defines `calendar-sync-private-config-file'
;;   defaulting to ~/.emacs.d/calendar-sync.local.el.
;; - At the bottom of that module, `calendar-sync--load-private-config'
;;   calls `load' on that path if readable. Missing file = silent no-op,
;;   and `calendar-sync-now' prints "No calendars configured".
;; - `user-constants' is required earlier in init.el, so `gcal-file',
;;   `pcal-file', and `dcal-file' are bound when this file is evaluated.
;;
;; Where to find the private .ics URL:
;; - Google Calendar: Settings -> Your Calendar -> Integrate calendar ->
;;   "Secret address in iCal format" (regenerate if leaked).
;; - Proton Calendar: Settings -> Import/Export / Share -> "Share with
;;   anyone (via link)" -> copy the .ics URL.

(setq calendar-sync-calendars
      `((:name "google"
         :url "https://calendar.google.com/calendar/ical/YOUR_ADDRESS%40gmail.com/private-XXXXXXXXXX/basic.ics"
         :file ,gcal-file)
        (:name "proton"
         :url "https://calendar.proton.me/api/calendar/v1/url/XXXXXXXX/calendar.ics?CacheKey=XXXXXXXX&PassphraseKey=XXXXXXXX"
         :file ,pcal-file)
        (:name "deepsat"
         :url "https://calendar.google.com/calendar/ical/YOUR_WORK_ADDRESS%40example.com/private-XXXXXXXXXX/basic.ics"
         :file ,dcal-file)))

(provide 'calendar-sync.local)
;;; calendar-sync.local.el.example ends here