2018-02-18 03:10:09 -05:00
|
|
|
;;; app/calendar/config.el -*- lexical-binding: t; -*-
|
2018-01-13 17:26:40 +08:00
|
|
|
|
2018-02-19 15:18:36 -05:00
|
|
|
(defvar +calendar-org-gcal-secret-file
|
|
|
|
(expand-file-name "private/org/secret.el" doom-modules-dir)
|
|
|
|
"TODO")
|
|
|
|
|
2018-02-19 20:19:54 -05:00
|
|
|
(defvar +calendar-open-function #'+calendar/open-calendar
|
2018-02-19 15:18:36 -05:00
|
|
|
"TODO")
|
|
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
;; Plugins
|
|
|
|
;;
|
|
|
|
|
2018-01-13 17:26:40 +08:00
|
|
|
(def-package! calfw
|
|
|
|
:commands (cfw:open-calendar-buffer)
|
|
|
|
:config
|
|
|
|
;; better frame for calendar
|
2018-02-19 15:18:36 -05:00
|
|
|
(setq cfw:face-item-separator-color nil
|
|
|
|
cfw:render-line-breaker 'cfw:render-line-breaker-none
|
|
|
|
cfw:fchar-junction ?╋
|
|
|
|
cfw:fchar-vertical-line ?┃
|
|
|
|
cfw:fchar-horizontal-line ?━
|
|
|
|
cfw:fchar-left-junction ?┣
|
|
|
|
cfw:fchar-right-junction ?┫
|
|
|
|
cfw:fchar-top-junction ?┯
|
|
|
|
cfw:fchar-top-left-corner ?┏
|
|
|
|
cfw:fchar-top-right-corner ?┓)
|
|
|
|
|
|
|
|
(map! :map cfw:calendar-mode-map "q" #'+calendar/quit)
|
|
|
|
|
|
|
|
(when (featurep 'solaire-mode)
|
|
|
|
(add-hook 'cfw:calendar-mode-hook #'solaire-mode))
|
2018-03-02 17:40:51 -05:00
|
|
|
(add-hook 'cfw:calendar-mode-hook 'hide-mode-line-mode)
|
2018-02-19 15:18:36 -05:00
|
|
|
|
|
|
|
(advice-add #'cfw:render-button :override #'+calendar*cfw:render-button))
|
|
|
|
|
2018-01-13 17:26:40 +08:00
|
|
|
|
|
|
|
(def-package! calfw-org
|
|
|
|
:commands (cfw:open-org-calendar
|
|
|
|
cfw:org-create-source
|
|
|
|
cfw:open-org-calendar-withkevin
|
|
|
|
my-open-calendar))
|
|
|
|
|
2018-02-19 15:18:36 -05:00
|
|
|
|
2018-01-13 17:26:40 +08:00
|
|
|
(def-package! org-gcal
|
|
|
|
:commands (org-gcal-sync
|
|
|
|
org-gcal-fetch
|
|
|
|
org-gcal-post-at-point
|
|
|
|
org-gcal-delete-at-point)
|
|
|
|
:config
|
2018-01-13 17:57:38 +08:00
|
|
|
(load-file +calendar-org-gcal-secret-file)
|
2018-01-13 17:26:40 +08:00
|
|
|
;; hack to avoid the deferred.el error
|
|
|
|
(defun org-gcal--notify (title mes)
|
|
|
|
(message "org-gcal::%s - %s" title mes)))
|
|
|
|
|
2018-02-19 15:18:36 -05:00
|
|
|
|
2018-01-13 17:26:40 +08:00
|
|
|
;; (def-package! alert)
|