doomemacs/modules/app/calendar/config.el
Henrik Lissner 1e81a35461
Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00

59 lines
1.5 KiB
EmacsLisp

;;; app/calendar/config.el -*- lexical-binding: t; -*-
(defvar +calendar-org-gcal-secret-file
(expand-file-name "private/org/secret.el" doom-modules-dir)
"TODO")
(defvar +calendar-open-function #'+calendar/open-calendar
"TODO")
;;
;; Plugins
;;
(def-package! calfw
:commands (cfw:open-calendar-buffer)
:config
;; better frame for calendar
(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 ?┓)
(define-key cfw:calendar-mode-map "q" #'+calendar/quit)
(when (featurep 'solaire-mode)
(add-hook 'cfw:calendar-mode-hook #'solaire-mode))
(add-hook 'cfw:calendar-mode-hook 'hide-mode-line-mode)
(advice-add #'cfw:render-button :override #'+calendar*cfw:render-button))
(def-package! calfw-org
:commands (cfw:open-org-calendar
cfw:org-create-source
cfw:open-org-calendar-withkevin
my-open-calendar))
(def-package! org-gcal
:commands (org-gcal-sync
org-gcal-fetch
org-gcal-post-at-point
org-gcal-delete-at-point)
:config
(load-file +calendar-org-gcal-secret-file)
;; hack to avoid the deferred.el error
(defun org-gcal--notify (title mes)
(message "org-gcal::%s - %s" title mes)))
;; (def-package! alert)