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 20:19:54 -05:00
|
|
|
(defvar +calendar-open-function #'+calendar/open-calendar
|
2018-02-19 15:18:36 -05:00
|
|
|
"TODO")
|
|
|
|
|
|
|
|
|
|
|
|
;;
|
2018-09-07 19:36:16 -04:00
|
|
|
;; Packages
|
2018-02-19 15:18:36 -05:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! calfw
|
2019-07-23 12:30:47 +02:00
|
|
|
:commands cfw:open-calendar-buffer
|
2018-01-13 17:26:40 +08:00
|
|
|
: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 ?┓)
|
|
|
|
|
2021-03-06 00:05:51 -05:00
|
|
|
(set-popup-rule! "^\\*cfw:details" :quit t :ttl 0 :select t :size 0.4)
|
|
|
|
|
2018-06-03 15:46:00 +02:00
|
|
|
(define-key cfw:calendar-mode-map "q" #'+calendar/quit)
|
2018-02-19 15:18:36 -05:00
|
|
|
|
2019-07-18 15:27:20 +02:00
|
|
|
(add-hook 'cfw:calendar-mode-hook #'doom-mark-buffer-as-real-h)
|
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
|
|
|
|
2019-07-23 12:30:47 +02:00
|
|
|
(advice-add #'cfw:render-button :override #'+calendar-cfw:render-button-a))
|
2018-02-19 15:18:36 -05:00
|
|
|
|
2018-01-13 17:26:40 +08:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! calfw-org
|
2018-01-13 17:26:40 +08:00
|
|
|
:commands (cfw:open-org-calendar
|
|
|
|
cfw:org-create-source
|
2020-07-29 11:55:44 +02:00
|
|
|
cfw:org-create-file-source
|
2018-01-13 17:26:40 +08:00
|
|
|
cfw:open-org-calendar-withkevin
|
|
|
|
my-open-calendar))
|
|
|
|
|
2020-07-29 22:01:19 +02:00
|
|
|
(use-package! calfw-cal
|
|
|
|
:commands (cfw:cal-create-source))
|
|
|
|
|
2020-06-14 18:31:29 -05:00
|
|
|
(use-package! calfw-ical
|
|
|
|
:commands (cfw:ical-create-source))
|
|
|
|
|
2018-02-19 15:18:36 -05:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! org-gcal
|
2018-01-13 17:26:40 +08:00
|
|
|
:commands (org-gcal-sync
|
|
|
|
org-gcal-fetch
|
|
|
|
org-gcal-post-at-point
|
|
|
|
org-gcal-delete-at-point)
|
2020-05-02 17:56:52 +12:00
|
|
|
:init
|
|
|
|
(defvar org-gcal-dir (concat doom-cache-dir "org-gcal/"))
|
|
|
|
(defvar org-gcal-token-file (concat org-gcal-dir "token.gpg"))
|
2018-01-13 17:26:40 +08:00
|
|
|
:config
|
|
|
|
;; hack to avoid the deferred.el error
|
|
|
|
(defun org-gcal--notify (title mes)
|
|
|
|
(message "org-gcal::%s - %s" title mes)))
|