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.

104 lines
2.9 KiB

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