+org.el 5.3 KB

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