Configure org-mode

This commit is contained in:
Jeremy Dormitzer 2021-02-23 11:09:07 -05:00
parent 02bc64639a
commit d662a31e5a
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,86 @@
;; The all-powerful Org mode
(use-package org
:straight org-plus-contrib
:mode (("\\.org\\'" . org-mode))
:init
(leader-def-key "o" '(nil :which-key "org"))
:custom
(org-agenda-files `(,(expand-file-name "~/org/todo.org")
,(expand-file-name "~/org/deft/unifydb.org")
,(expand-file-name "~/org/lola-gcal.org")
,(expand-file-name "~/org/personal-gcal.org")
,(expand-file-name "~/org/j-n-gcal.org")))
(org-todo-keywords '((sequence
"TODO(t)"
"IN PROGRESS(i)"
"BLOCKED(b)"
"|"
"DONE(d)"
"CANCELLED(c)")))
(org-return-follows-link t)
(org-ellipsis "")
(org-src-fontify-natively t)
(org-log-done 'time)
(org-agenda-custom-commands '(("t" "TODOs"
((agenda)
(alltodo)))))
(org-agenda-span 'day)
(org-agenda-todo-ignore-scheduled 'future)
(org-agenda-tags-todo-honor-ignore-options t)
:general
(leader-map "oa" #'org-agenda)
(leader-map "oc" #'org-capture))
(use-package evil-org
:after org
:hook ((org-mode . evil-org-mode)
(org-agenda-mode . (lambda ()
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)))))
(use-package org-super-agenda
:after (org)
:defer 1
:config
(org-super-agenda-mode)
;; Nuke the header keybindings
(setq org-super-agenda-header-map (make-sparse-keymap))
:custom
(org-super-agenda-groups '((:name "In progress"
:todo "IN PROGRESS")
(:name "Lola"
:tag "@lola")
(:name "unifyDB"
:tag "@unifydb")
(:name "Personal"
:tag "@personal"))))
(use-package org-gcal
:commands (org-gcal-sync
org-gcal-fetch
org-gcal-post-at-point
org-gcal-delete-at-point
org-gcal-request-token)
:after (org evil-org)
:init
(defun org-agenda-redo-and-fetch-gcal (&optional all)
(interactive "P")
(let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
(deferred:nextc (org-gcal-fetch) cb)))
(advice-add 'evil-org-agenda-set-keys :after
(lambda ()
(general-def 'motion org-agenda-mode-map
"gR" #'org-agenda-redo-and-fetch-gcal)))
:config
(setq org-gcal-client-id (password-store-get "lola-org-gcal-client-id")
org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" .
,(expand-file-name "~/org/lola-gcal.org"))
("jeremy.dormitzer@gmail.com" .
,(expand-file-name "~/org/personal-gcal.org"))
("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" .
,(expand-file-name "~/org/j-n-gcal.org")))
org-gcal-notify-p nil))
(provide 'init-org)

View File

@ -57,6 +57,7 @@
(require 'init-keybindings)
(require 'init-auth)
(require 'init-lib)
(require 'init-org)
(require 'init-profiler)
(require 'init-built-ins)
(require 'init-dashboard)