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.

126 lines
3.5 KiB

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