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.

149 lines
4.2 KiB

4 years ago
4 years ago
4 years ago
  1. (setq epa-file-select-keys 2
  2. epa-file-cache-passphrase-for-symmetric-encryption t
  3. epa-file-encrypt-to dotfiles/public-key)
  4. (use-package org-superstar
  5. :after org
  6. :hook (org-mode . org-superstar-mode))
  7. (use-package org-roam
  8. :hook (after-init . org-roam-mode)
  9. :custom (org-roam-directory org-directory)
  10. (org-roam-encrypt-files t)
  11. (org-roam-capture-templates '())
  12. (org-roam-dailies-capture-templates
  13. '(("d" "Default" entry (function org-roam-capture--get-point)
  14. "* %?"
  15. :file-name "docs/daily/%<%Y-%m-%d>"
  16. :head
  17. "
  18. #+TITLE: %<%Y-%m-%d>
  19. #+AUTHOR: Christopher James Hayward
  20. "))))
  21. (dotfiles/leader
  22. "r" '(:ignore t :which-key "Roam")
  23. "rf" '(org-roam-find-file :which-key "Find")
  24. "rb" '(org-roam-buffer-toggle-display :which-key "Buffer")
  25. "rd" '(:ignore t :which-key "Dailies")
  26. "rdd" '(org-roam-dailies-find-date :which-key "Date")
  27. "rdt" '(org-roam-dailies-find-today :which-key "Today")
  28. "rdm" '(org-roam-dailies-find-tomorrow :which-key "Tomorrow")
  29. "rdy" '(org-roam-dailies-find-yesterday :which-key "Yesterday"))
  30. (use-package org-roam-server
  31. :hook (org-roam-mode . org-roam-server-mode))
  32. (use-package ox-hugo
  33. :after ox)
  34. (with-eval-after-load 'org-roam
  35. (add-to-list 'org-roam-capture-templates
  36. '("p" "Post" plain (function org-roam-capture--get-point)
  37. "%?"
  38. :file-name "docs/posts/${slug}"
  39. :unnarrowed t
  40. :head
  41. "
  42. #+TITLE: ${title}
  43. #+AUTHOR: Christopher James Hayward
  44. #+DATE: %<%Y-%m-%d>
  45. #+EXPORT_FILE_NAME: ${slug}
  46. #+ROAM_KEY: https://chrishayward.xyz/posts/${slug}/
  47. #+HUGO_BASE_DIR: ../
  48. #+HUGO_AUTO_SET_LASTMOD: t
  49. #+HUGO_SECTION: posts
  50. #+HUGO_DRAFT: true
  51. ")))
  52. (with-eval-after-load 'org-roam
  53. (add-to-list 'org-roam-capture-templates
  54. '("n" "Notes" plain (function org-roam-capture--get-point)
  55. "%?"
  56. :file-name "docs/notes/${slug}"
  57. :unnarrowed t
  58. :head
  59. "
  60. #+TITLE: ${title}
  61. #+AUTHOR: Christopher James Hayward
  62. #+EXPORT_FILE_NAME: ${slug}
  63. #+ROAM_KEY: https://chrishayward.xyz/notes/${slug}/
  64. #+HUGO_BASE_DIR: ../
  65. #+HUGO_AUTO_SET_LASTMOD: t
  66. #+HUGO_SECTION: notes
  67. #+HUGO_DRAFT: true
  68. ")))
  69. (use-package ox-reveal
  70. :after ox
  71. :custom (org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js"))
  72. (with-eval-after-load 'org-roam
  73. (add-to-list 'org-roam-capture-templates
  74. '("s" "Slides" plain (function org-roam-capture--get-point)
  75. "%?"
  76. :file-name "docs/slides/${slug}"
  77. :unnarrowed t
  78. :head
  79. "
  80. #+TITLE: ${title}
  81. #+AUTHOR: Christopher James Hayward
  82. #+EXPORT_FILE_NAME: ${slug}
  83. #+OPTIONS: toc:nil num:nil reveal_title_slide:nil
  84. #+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js
  85. #+REVEAL_THEME: serif
  86. ")))
  87. (unless (string-match-p "\\.gpg" org-agenda-file-regexp)
  88. (setq org-agenda-file-regexp
  89. (replace-regexp-in-string "\\\\\\.org" "\\\\.org\\\\(\\\\.gpg\\\\)?"
  90. org-agenda-file-regexp)))
  91. (with-eval-after-load 'org-roam
  92. (add-to-list 'org-roam-capture-templates
  93. '("c" "Course" plain (function org-roam-capture--get-point)
  94. "%?"
  95. :file-name "docs/courses/${slug}"
  96. :unnarrowed t
  97. :head
  98. "
  99. #+TITLE: ${title}
  100. #+SUBTITLE:
  101. #+AUTHOR: Christopher James Hayward
  102. ")))
  103. (setq org-agenda-files '("~/.emacs.d/docs/"
  104. "~/.emacs.d/docs/courses/"
  105. "~/.emacs.d/docs/daily/"))
  106. (dotfiles/leader
  107. "a" '(org-agenda :which-key "Agenda"))
  108. (use-package screenshot
  109. :commands (screenshot))
  110. (use-package gif-screencast
  111. :commands (gif-screencast-start-or-stop gif-screencast-toggle-pause)
  112. :custom (gif-screencast-output-directory (concat dotfiles/home "docs/images/")))
  113. (dotfiles/leader
  114. "s" '(:ignore t :which-key "Screen")
  115. "ss" '(screenshot :which-key "Screenshot")
  116. "sc" '(gif-screencast-start-or-stop :which-key "Screencast"))
  117. (use-package writegood-mode
  118. :after org
  119. :config (writegood-mode))
  120. (dotfiles/leader
  121. "tw" '(writegood-mode :which-key "Grammar"))
  122. (use-package ispell
  123. :after org
  124. :custom (ispell-dictionary dotfiles/lang))