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.

142 lines
4.0 KiB

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