doomemacs/modules/app/calendar
Henrik Lissner 77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
..
autoload.el 💥 Remove :feature category 2019-04-24 18:16:04 -04:00
config.el General, minor refactoring 2019-02-24 13:58:56 -05:00
packages.el app/calendar: fix path in comment header 2018-02-18 03:10:09 -05:00
readme.org Add: =calendar app 2018-01-13 17:26:40 +08:00

`=Calendar App`

Setup sync between google calendar and org file

  • Checkout https://github.com/myuhe/org-gcal.el, put the following content in a file secret.el and set the variable `+calendar-org-gcal-secret-file` to the path of that file.

    (setq org-gcal-client-id "your-id-foo.apps.googleusercontent.com"
        org-gcal-client-secret "your-secret"
        org-gcal-file-alist '(("your-mail@gmail.com" .  "~/schedule.org")
                              ("another-mail@gmail.com" .  "~/task.org")))

Doom faces

I'm using the following setting:

;; calfw
(cfw:face-title              :foreground blue                     :bold bold :height 2.0 :inherit 'variable-pitch)
(cfw:face-header             :foreground (doom-blend blue bg 0.8) :bold bold)
(cfw:face-sunday             :foreground (doom-blend red bg 0.8)  :bold bold)
(cfw:face-saturday           :foreground (doom-blend red bg 0.8)  :bold bold)
(cfw:face-holiday            :foreground nil :background bg-alt   :bold bold)
(cfw:face-grid               :foreground vertical-bar)
(cfw:face-periods            :foreground yellow)
(cfw:face-toolbar            :foreground nil :background nil)
(cfw:face-toolbar-button-off :foreground base6                    :bold bold             :inherit 'variable-pitch)
(cfw:face-toolbar-button-on  :foreground blue                     :bold bold             :inherit 'variable-pitch)

(cfw:face-default-content    :foreground fg)
(cfw:face-day-title          :foreground fg                       :bold bold)
(cfw:face-today-title        :foreground bg  :background blue     :bold bold)
(cfw:face-default-day                                             :bold bold)
(cfw:face-today              :foreground nil :background nil      :bold bold)
(cfw:face-annotation         :foreground violet)
(cfw:face-disable            :foreground grey)
(cfw:face-select                             :background region)

Adjust calendar to be included

Checkout example from https://github.com/kiwanami/emacs-calfw

(defun my-open-calendar ()
  (interactive)
  (cfw:open-calendar-buffer
   :contents-sources
   (list
    (cfw:org-create-source "Green")  ; orgmode source
    (cfw:howm-create-source "Blue")  ; howm source
    (cfw:cal-create-source "Orange") ; diary source
    (cfw:ical-create-source "Moon" "~/moon.ics" "Gray")  ; ICS source1
    (cfw:ical-create-source "gcal" "https://..../basic.ics" "IndianRed") ; google calendar ICS
   )))

Specifically, if you want to adjust the org files to be included, use a let binding to set the org-agenda-files like below:

;;;###autoload
(defun cfw:open-org-calendar-with-cal1 ()
  (interactive)
  (let ((org-agenda-files '("/path/to/org/" "/path/to/cal1.org")))
    (call-interactively '+calendar/open-calendar)))

;;;###autoload
(defun cfw:open-org-calendar-with-cal2 ()
  (interactive)
  (let ((org-agenda-files '("/path/to/org/" "/path/to/cal2.org")))
    (call-interactively '+calendar/open-calendar)))