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