+org.el 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ;;; package --- summary +org.el
  2. ;;; lexical-binding: t; -*-
  3. ;;; Commentary:
  4. ;;; Code:
  5. (setq +todo-file "~/org/inbox.org")
  6. (setq +today-file "~/org/today.org")
  7. (after! org
  8. (setq org-directory (expand-file-name "~/org/")
  9. org-journal-dir "~/org/journal/"
  10. org-agenda-files (list org-directory)
  11. org-agenda-window-setup 'only-window
  12. org-pretty-entities t
  13. org-log-done 'time
  14. org-contacts-files '("~/org/contacts.org")
  15. ; attempt to return todo function to spacemacs
  16. evil-org-key-theme '(textobjects navigation additional insert todo)
  17. ;; show actually italicized text instead of /italicized text/
  18. org-agenda-block-separator ""
  19. org-fontify-whole-heading-line t
  20. org-fontify-done-headline t
  21. org-fontify-quote-and-verse-blocks t
  22. org-bullets-bullet-list '("#")
  23. org-capture-templates
  24. '(("i" "Send to inbox" entry (file+headline "~/org/inbox.org" "Inbox")
  25. "* TODO %?\n")
  26. ("l" "Send to inbox with link" entry (file+headline "~/org/inbox.org" "Inbox")
  27. "* TODO %?\n %i\n %a")
  28. ("w" "Work diary entry" entry (file "~/org/work_diary.org")
  29. "* %u\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)" "WAITING(w)" "MAYBE(m)" "|" "DONE(d)"))
  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. ("DONE" . (:foreground "light sea green")))
  40. org-agenda-span 5
  41. org-agenda-start-day "1d"
  42. org-agenda-custom-commands
  43. '(("N" "List all next tasks" ((agenda "" ((org-agenda-span 1)))
  44. (tags "@errand/-DONE") ; should generaly be pretty empty
  45. (tags "@book/NEXT") ; should generaly be pretty empty
  46. (tags "@work/NEXT")
  47. (tags "@home/NEXT")
  48. (tags "@night/NEXT")
  49. (tags "@selectp/NEXT")))
  50. ("R" "Weekly Review"
  51. ((agenda "" ((org-agenda-span 7)))
  52. (stuck "") ; review stuck projects as designated by org-stuck-projects
  53. (tags "PROJECT/-DONE-MAYBE") ; review all projects
  54. (todo "MAYBE") ; review someday/maybe items
  55. (todo "WAITING")))) ; review waiting items
  56. org-use-tag-inheritance t; bug in variable below, just turn 'em off
  57. org-tags-exclude-from-injeritance '("PROJECT" "SPRINT") ; PROJECT should not be inheritable
  58. org-stuck-projects
  59. '("+PROJECT/-MAYBE-DONE" ("TODO" "NEXT") nil "\\<IGNORE\\>")
  60. org-tag-alist '(("PROJECT" . ?p)
  61. ("@home" . ?h)
  62. ("@night" . ?n)
  63. ("@selectp" . ?s)
  64. ("@errand" . ?e)
  65. ("@read" . ?r)
  66. ("@work" . ?w)
  67. ("@family" . ?f))
  68. org-modules '(org-drill
  69. org-clock
  70. org-id
  71. org-info
  72. org-habit
  73. org-protocol
  74. org-annotate-file
  75. org-eval
  76. org-expiry
  77. org-contacts
  78. org-man
  79. org-notmuch
  80. org-collector
  81. org-panel
  82. org-screen
  83. org-toc)
  84. ; refile targets
  85. org-refile-targets '(("~/org/todo.org" :maxlevel . 2)
  86. ("~/org/someday.org" :maxlevel . 2)
  87. ("~/org/town.org" :maxlevel . 2)
  88. ("~/org/personal.org" :maxlevel . 2)
  89. ("~/org/elation.org" :maxlevel . 2))))
  90. ;; org-match-sparse-tree
  91. ;;
  92. ;; org-set-tags-command
  93. (defun +open-todo-file ()
  94. (interactive)
  95. "Opens the todo file"
  96. (find-file +todo-file))
  97. (defun +open-today-file ()
  98. (interactive)
  99. "Opens the today file"
  100. (find-file +today-file))
  101. (map!
  102. :leader
  103. :desc "Open inbox" "I" #'+open-todo-file
  104. :desc "Open today" "T" #'+open-today-file)
  105. (defun +show-agenda ()
  106. (interactive)
  107. (delete-other-windows)
  108. (with-popup-rules! nil
  109. (org-agenda-list)
  110. (calendar))
  111. (other-window 1)
  112. (split-window-vertically)
  113. (other-window 1)
  114. (find-file +todo-file))
  115. (map! :leader
  116. (:prefix "a"
  117. :desc "Org Agenda" "o" #'org-agenda
  118. :desc "Org open link" "l" #'org-open-at-point
  119. :desc "Sync gcal with org" "g" #'org-gcal-sync
  120. :desc "Set task deadline" "d" #'org-deadline
  121. :desc "Schedule task" "s" #'org-schedule
  122. :desc "New journal entry" "j" #'org-journal-new-entry
  123. :desc "Org set property" "p" #'org-set-progerty
  124. :desc "Save all org buffers" "a" #'org-save-all-org-buffers
  125. :desc "Org todo" "t" #'org-todo
  126. :desc "Org set tags" "T" #'counsel-org-tag))