+org.el 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. ;;; package --- summary +org.el
  2. ;;; lexical-binding: t; -*-
  3. ;;; Commentary:
  4. ;;; Code:
  5. (setq +inbox-file "~/org/inbox.org")
  6. (setq +project-file "~/org/projects.org")
  7. (setq +reminders-file "~/org/reminders.org")
  8. (setq +today-file "~/org/today.org")
  9. (after! org
  10. (setq org-directory (expand-file-name "~/org/")
  11. org-journal-dir "~/org/journal/"
  12. org-agenda-files (list org-directory)
  13. org-agenda-window-setup 'only-window
  14. org-pretty-entities t
  15. org-log-done 'time
  16. org-contacts-files '("~/org/contacts.org")
  17. ; attempt to return todo function to spacemacs
  18. evil-org-key-theme '(textobjects navigation additional insert todo)
  19. ;; show actually italicized text instead of /italicized text/
  20. org-agenda-block-separator ""
  21. org-fontify-whole-heading-line t
  22. org-fontify-done-headline t
  23. org-fontify-quote-and-verse-blocks t
  24. org-bullets-bullet-list '(">")
  25. org-capture-templates
  26. '(("i" "Send to inbox" entry (file+headline "~/org/inbox.org" "Inbox")
  27. "* TODO %?\n")
  28. ("l" "Send to inbox with link" entry (file+headline "~/org/inbox.org" "Inbox")
  29. "* TODO %?\n %i\n %a")
  30. ("w" "Work diary entry" entry (file "~/org/work_diary.org")
  31. "* %u\n%?\n")
  32. ("n" "Add an idea" entry (file "~/org/ideas.org")
  33. "* %?\nEntered on %U\n"))
  34. org-todo-keywords
  35. '((sequence "TODO(t)" "NEXT(n)" "WAITING(w)" "MAYBE(m)" "|" "DONE(d)"))
  36. org-todo-keyword-faces
  37. '((("TODO" . (:foreground "red" :weight bold))
  38. ("NEXT" . (:foreground "blue"))
  39. ("MAYBE" . (:foreground "sea green"))
  40. ("WAITING" . (:foreground "forest green")))
  41. ("DONE" . (:foreground "light sea green")))
  42. org-agenda-span 5
  43. org-agenda-start-day "1d"
  44. org-agenda-custom-commands
  45. '(("N" "List all next tasks" ((agenda "" ((org-agenda-span 1)))
  46. (tags "@errand/-DONE") ; should generaly be pretty empty
  47. (tags "@book/NEXT") ; should generaly be pretty empty
  48. (tags "@work/NEXT")
  49. (tags "@home/NEXT")
  50. (tags "@farm/NEXT")
  51. (tags "@town/NEXT")))
  52. ("R" "Weekly Review"
  53. ((agenda "" ((org-agenda-span 7)))
  54. (stuck "") ; review stuck projects as designated by org-stuck-projects
  55. (tags "PROJECT/-DONE-MAYBE") ; review all projects
  56. (todo "MAYBE") ; review someday/maybe items
  57. (todo "WAITING")))) ; review waiting items
  58. ;;org-use-tag-inheritance t; bug in variable below, just turn 'em off
  59. ;;org-tags-exclude-from-injeritance '("PROJECT" "SPRINT") ; PROJECT should not be inheritable
  60. org-stuck-projects
  61. '("+PROJECT/-MAYBE-DONE" ("TODO" "NEXT") nil "\\<IGNORE\\>")
  62. org-tag-alist '(("@home" . ?h)
  63. ("@farm" . ?f)
  64. ("@town" . ?s)
  65. ("@errand" . ?e)
  66. ("@work" . ?w)
  67. ("@family" . ?m))
  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-inbox-file ()
  94. (interactive)
  95. "Opens the inbox file"
  96. (find-file +inbox-file))
  97. (defun +open-projects-file ()
  98. (interactive)
  99. "Opens the projects file"
  100. (find-file +project-file))
  101. (defun +open-reminders-file ()
  102. (interactive)
  103. "Opens the reminders file"
  104. (find-file +reminders-file))
  105. (defun +open-today-file ()
  106. (interactive)
  107. "Opens the today file"
  108. (find-file +today-file))
  109. (map!
  110. :leader
  111. :desc "Open inbox" "I" #'+open-inbox-file
  112. :desc "Open inbox" "P" #'+open-projects-file
  113. :desc "Open inbox" "R" #'+open-reminders-file
  114. :desc "Open today" "T" #'+open-today-file)
  115. (defun +show-agenda ()
  116. (interactive)
  117. (delete-other-windows)
  118. (with-popup-rules! nil
  119. (org-agenda-list)
  120. (calendar))
  121. (other-window 1)
  122. (split-window-vertically)
  123. (other-window 1)
  124. (find-file +todo-file))
  125. (map! :leader
  126. (:prefix "a"
  127. :desc "Org Agenda" "o" #'org-agenda
  128. :desc "Org open link" "l" #'org-open-at-point
  129. :desc "Sync gcal with org" "g" #'org-gcal-sync
  130. :desc "Set task deadline" "d" #'org-deadline
  131. :desc "Schedule task" "s" #'org-schedule
  132. :desc "New journal entry" "j" #'org-journal-new-entry
  133. :desc "Org set property" "p" #'org-set-progerty
  134. :desc "Save all org buffers" "a" #'org-save-all-org-buffers
  135. :desc "Org todo" "t" #'org-todo
  136. :desc "Org set tags" "T" #'counsel-org-tag))