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.

148 lines
4.1 KiB

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