I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

187 lines
5.8 KiB

4 years ago
  1. (use-package org-superstar
  2. :hook (org-mode . org-superstar-mode))
  3. (use-package mu4e
  4. :load-path "/usr/share/emacs/site-lisp/mu4e"
  5. :config
  6. (setq mu4e-change-filenames-when-moving t
  7. mu4e-update-interval (* 5 60) ;; Every 5 minutes.
  8. mu4e-get-mail-command "mbsync -a"
  9. mu4e-maildir "~/.cache/mail"
  10. mu4e-compose-signature
  11. (concat "Chris Hayward\n"
  12. "https://chrishayward.xyz\n"))
  13. ;; Ensure plain text scales for all devices.
  14. (setq mu4e-compose-format-flowed t)
  15. ;; GPG signing key for outbound mail.
  16. (setq mml-secure-openpgp-signers '("37AB1CB72B741E478CA026D43025DCBD46F81C0F"))
  17. (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
  18. (setq message-send-mail-function 'smtpmail-send-it)
  19. ;; Configure mail account(s).
  20. (setq mu4e-contexts
  21. (list
  22. ;; Main
  23. ;; chris@chrishayward.xyz
  24. (make-mu4e-context
  25. :name "Main"
  26. :match-func
  27. (lambda (msg)
  28. (when msg
  29. (string-prefix-p "/Main" (mu4e-message-field msg :maildir))))
  30. :vars
  31. '((user-full-name . "Christopher James Hayward")
  32. (user-mail-address . "chris@chrishayward.xyz")
  33. (smtpmail-smtp-server . "mail.chrishayward.xyz")
  34. (smtpmail-smtp-service . 587)
  35. (smtpmail-stream-type . starttls))))))
  36. (dotfiles/leader
  37. "m" '(mu4e :which-key "Mail"))
  38. (use-package org-roam
  39. :hook (after-init . org-roam-mode)
  40. :custom (org-roam-directory dotfiles/brain))
  41. (use-package org-roam-server
  42. :hook (org-roam-mode . org-roam-server-mode))
  43. (dotfiles/leader
  44. "r" '(:ignore t :which-key "Roam")
  45. "rf" '(org-roam-find-file :which-key "Find")
  46. "rb" '(org-roam-buffer-toggle-display :which-key "Buffer")
  47. "rc" '(org-roam-capture :which-key "Capture")
  48. "rd" '(:ignore t :which-key "Dailies")
  49. "rdd" '(org-roam-dailies-find-date :which-key "Date")
  50. "rdt" '(org-roam-dailies-find-today :which-key "Today")
  51. "rdm" '(org-roam-dailies-find-tomorrow :which-key "Tomorrow")
  52. "rdy" '(org-roam-dailies-find-yesterday :which-key "Yesterday"))
  53. (setq org-roam-capture-templates
  54. '(("d" "Default" plain (function org-roam-capture--get-point)
  55. "%?"
  56. :file-name "${slug}"
  57. :head "#+TITLE: ${title}\n"
  58. :unnarrowed t)))
  59. (setq org-roam-dailies-capture-templates
  60. '(("d" "Default" entry (function org-roam-capture--get-point)
  61. "* %?"
  62. :file-name "daily/%<%Y-%m-%d>"
  63. :head "#+TITLE: %<%Y-%m-%d>\n")))
  64. (use-package org-noter
  65. :after org
  66. :config
  67. (setq org-noter-always-create-frame nil
  68. org-noter-notes-search-path dotfiles/notes))
  69. (use-package org-pdftools
  70. :hook (org-mode . org-pdftools-setup-link))
  71. (use-package org-noter-pdftools
  72. :after org-noter
  73. :config
  74. (with-eval-after-load 'pdf-annot
  75. (add-hook 'pdf-annot-active-handler-functions #'org-noter-pdftools-jump-to-note)))
  76. (setq bibtex-completion-notes-path dotfiles/notes
  77. bibtex-completion-bibliography dotfiles/bib
  78. bibtex-completion-pdf-field "file"
  79. bibtex-completion-notes-template-multiple-files
  80. (concat
  81. "#+TITLE: ${title}\n"
  82. "#+ROAM_KEY: cite:${=key=}\n"
  83. "#* TODO Notes\n"
  84. ":PROPERTIES:\n"
  85. ":CUSTOM_ID: ${=key}\n"
  86. ":NOTER_DOCUMENT: %(orb-process-file-field \"${=key=}\")\n"
  87. ":AUTHOR: ${author-abbrev}\n"
  88. ":JOURNAL: ${journaltitle}\n"
  89. ":DATE: ${date}\n"
  90. ":YEAR: ${year}\n"
  91. ":DOI: ${doi}\n"
  92. ":URL: ${url}\n"
  93. ":END:\n\n"))
  94. (use-package org-ref
  95. :config
  96. (setq org-ref-completion-library 'org-ref-helm-cite
  97. org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
  98. org-ref-default-bibliography dotfiles/bib
  99. org-ref-bibliography-notes dotfiles/notes
  100. org-ref-notes-directory dotfiles/notes
  101. org-ref-notes-function 'orb-edit-notes
  102. org-ref-note-title-format "* TODO %y - %t\n
  103. :PROPERTIES:\n
  104. :CUSTOM_ID: %k\n
  105. :NOTER_DOCUMENT: %F\n
  106. :ROAM_KEY: cite:%k\n
  107. :AUTHOR: %9a\n
  108. :JOURNAL: %j\n
  109. :YEAR: %y\n
  110. :VOLUME: %v\n
  111. :PAGES: %p\n
  112. :DOI: %D\n
  113. :URL: %U\n
  114. :END:\n\n"))
  115. (use-package org-roam-bibtex
  116. :after (org-roam)
  117. :hook (org-roam-mode . org-roam-bibtex-mode)
  118. :config
  119. (setq orb-preformat-keywords
  120. '("=key=" "title" "url" "file" "author-or-editor" "keywords")))
  121. (add-to-list 'org-roam-capture-templates
  122. '("n" "Notes" plain (function org-roam-capture--get-point)
  123. ""
  124. :file-name "notes/${slug}"
  125. :head "#+TITLE: ${=key=}: ${title}\n\n
  126. #+ROAM_KEY:${ref}\n\n* ${title}\n
  127. :PROPERTIES:\n
  128. :CUSTOM_ID: ${=key=}\n
  129. :URL: ${url}\n
  130. :AUTHOR: ${author-or-editor}\n
  131. :NOTER_DOCUMENT:%(orb-process-file-field \"${=key=}\")\n
  132. :NOTER_PAGE:\n
  133. :END:\n\n"))
  134. (setq org-agenda-files '("~/.local/source/brain/daily/"
  135. "~/.local/source/secrets/org/"))
  136. (dotfiles/leader
  137. "a" '(org-agenda :which-key "Agenda"))
  138. (use-package ox-hugo
  139. :after ox)
  140. (add-to-list 'org-roam-capture-templates
  141. '("b" "Blogging" plain (function org-roam-capture--get-point)
  142. "%?"
  143. :file-name "posts/${slug}"
  144. :head "#+TITLE: ${title}\n
  145. #+HUGO_BASE_DIR: ~/.local/source/website\n
  146. #+HUGO_SECTION: posts\n"))
  147. (use-package gif-screencast
  148. :custom
  149. (gif-screencast-output-directory (concat dotfiles/brain "screens/")))
  150. (dotfiles/leader
  151. "s" '(:ignore t :which-key "Screencast")
  152. "ss" '(gif-screencast-start-or-stop :which-key "Start / Stop")
  153. "sp" '(gif-screencast-toggle-pause :which-key "Pause"))
  154. (use-package ox-reveal
  155. :after ox
  156. :custom (org-reveal-root "https://cdn.jsdelivr.net/reveal.js/3.9.2/"))
  157. (add-to-list 'org-roam-capture-templates
  158. '("p" "Presentation" plain (function org-roam-capture--get-point)
  159. "%?"
  160. :file-name "slides/${slug}"
  161. :head "#+TITLE: ${title}\n"))