+org.el 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ;;; package --- summary +org.el
  2. ;;; lexical-binding: t; -*-
  3. ;;; Commentary:
  4. ;;; Code:
  5. (after! org
  6. (setq org-directory (expand-file-name "~/org/")
  7. org-journal-dir "~/org/journal/"
  8. org-agenda-files (list org-directory)
  9. org-agenda-window-setup 'only-window
  10. org-pretty-entities t
  11. org-log-done 'time
  12. ;org-contacts-files '("~/org/contacts.org")
  13. ; attempt to return todo function to spacemacs
  14. ;evil-org-key-theme '(textobjects navigation additional insert todo)
  15. ;; show actually italicized text instead of /italicized text/
  16. ;org-agenda-block-separator ""
  17. org-fontify-whole-heading-line t
  18. org-fontify-done-headline t
  19. org-fontify-quote-and-verse-blocks t
  20. org-ellipsis "…"
  21. org-capture-templates
  22. '(("i" "Send to inbox" entry (file+headline "~/org/inbox.org" "Inbox")
  23. "* TODO %?\n")
  24. ("l" "Send to inbox with link" entry (file+headline "~/org/inbox.org" "Inbox")
  25. "* TODO %?\n %i\n %a")
  26. ("w" "Work diary entry" entry (file "~/org/work_diary.org")
  27. "* %u\n%?\n")
  28. ("u" "Add unblink entry" entry (file+headline "~/org/unblink.org" "Misc")
  29. "* TITLE\n:PROPERTIES:\n:EXPORT_FILE_NAME: TITLE\n:EXPORT_DATE: %i\n:END:\n%?\n")
  30. ("n" "Add an idea" entry (file "~/org/ideas.org")
  31. "* %?\nEntered on %U\n"))
  32. org-todo-keywords
  33. '((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
  34. org-todo-keyword-faces
  35. '((("TODO" . (:foreground "red" :weight bold))
  36. ("NEXT" . (:foreground "blue"))
  37. ("MAYBE" . (:foreground "sea green"))
  38. ("WAITING" . (:foreground "forest green"))
  39. ("WONTDO" . (:foreground "forest green"))
  40. ("DONE" . (:foreground "light sea green"))))
  41. org-agenda-span 5
  42. org-agenda-start-day "1d"
  43. ;;org-use-tag-inheritance t; bug in variable below, just turn 'em off
  44. org-tag-alist '(("@personal" . ?h)
  45. ("@farm" . ?f)
  46. ("@town" . ?s)
  47. ("@errand" . ?e)
  48. ("@15five" . ?w)
  49. ("@family" . ?m))
  50. org-modules '(ol-eshell
  51. ol-notmuch
  52. ob-eval
  53. ob-exp
  54. ob-http
  55. org-drill
  56. org-id)))
  57. ;; Refiling
  58. (setq org-refile-targets '((nil :maxlevel . 9)
  59. (org-agenda-files :maxlevel . 9)))
  60. (setq org-outline-path-complete-in-steps nil) ; Refile in a single go
  61. (setq org-refile-use-outline-path t) ; Show full paths for refiling
  62. ;; org-set-tags-command
  63. (setq +inbox-file "~/org/inbox.org")
  64. (defun +open-inbox-file ()
  65. (interactive)
  66. "Opens the inbox file"
  67. (find-file +inbox-file))
  68. (map!
  69. :leader
  70. :desc "Open inbox" "I" #'+open-inbox-file
  71. :desc "Open today" "T" #'org-roam-today
  72. :desc "Open tomorrow" "N" #'org-roam-tomorrow)
  73. (defun +show-agenda ()
  74. (interactive)
  75. (delete-other-windows)
  76. (with-popup-rules! nil
  77. (org-agenda-list)
  78. (calendar))
  79. (other-window 1)
  80. (split-window-vertically)
  81. (other-window 1)
  82. (find-file +todo-file))
  83. (map! :leader
  84. (:prefix "f" :desc "Save all org buffers" "a" #'org-save-all-org-buffers))
  85. (use-package! org-roam
  86. :commands (org-roam-insert org-roam-find-file org-roam)
  87. :init
  88. (setq org-roam-directory "~/org/")
  89. (map! :leader
  90. :prefix "n"
  91. :desc "Org-Roam-Insert" "i" #'org-roam-insert
  92. :desc "Org-Roam-Find" "/" #'org-roam-find-file
  93. :desc "Org-Roam-Buffer" "r" #'org-roam)
  94. :config
  95. (org-roam-mode +1))
  96. (with-eval-after-load 'org-roam
  97. (with-eval-after-load 'company
  98. (with-eval-after-load 'org
  99. (require 'company-org-roam)
  100. (company-org-roam-init))))