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.

154 lines
4.3 KiB

4 years ago
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
  11. (org-roam-directory org-directory)
  12. (org-roam-encrypt-files t))
  13. (use-package org-roam-server
  14. :hook (org-roam-mode . org-roam-server-mode))
  15. (dotfiles/leader
  16. "r" '(:ignore t :which-key "Roam")
  17. "rf" '(org-roam-find-file :which-key "Find")
  18. "rb" '(org-roam-buffer-toggle-display :which-key "Buffer")
  19. "rd" '(:ignore t :which-key "Dailies")
  20. "rdd" '(org-roam-dailies-find-date :which-key "Date")
  21. "rdt" '(org-roam-dailies-find-today :which-key "Today")
  22. "rdm" '(org-roam-dailies-find-tomorrow :which-key "Tomorrow")
  23. "rdy" '(org-roam-dailies-find-yesterday :which-key "Yesterday"))
  24. (setq org-roam-capture-templates
  25. '(("p" "Posts" plain (function org-roam-capture--get-point)
  26. "%?"
  27. :file-name "docs/posts/${slug}"
  28. :unnarrowed t
  29. :head
  30. "
  31. #+TITLE: ${title}
  32. #+AUTHOR: Christopher James Hayward
  33. #+DATE: %<%Y-%m-%d>
  34. #+EXPORT_FILE_NAME: ${slug}
  35. #+ROAM_KEY: https://chrishayward.xyz/posts/${slug}/
  36. #+HUGO_BASE_DIR: ../../website/
  37. #+HUGO_AUTO_SET_LASTMOD: t
  38. #+HUGO_SECTION: posts
  39. #+HUGO_DRAFT: true
  40. ")
  41. ("n" "Notes" plain (function org-roam-capture--get-point)
  42. "%?"
  43. :file-name "docs/notes/${slug}"
  44. :unnarrowed t
  45. :head
  46. "
  47. #+TITLE: ${title}
  48. #+AUTHOR: Christopher James Hayward
  49. #+EXPORT_FILE_NAME: ${slug}
  50. #+ROAM_KEY: https://chrishayward.xyz/notes/${slug}/
  51. #+HUGO_BASE_DIR: ../../website
  52. #+HUGO_AUTO_SET_LASTMOD: t
  53. #+HUGO_SECTION: notes
  54. #+HUGO_DRAFT: true
  55. ")
  56. ("s" "Slides" plain (function org-roam-capture--get-point)
  57. "%?"
  58. :file-name "docs/slides/${slug}"
  59. :unnarrowed t
  60. :head
  61. "
  62. #+TITLE: ${title}
  63. #+AUTHOR: Christopher James Hayward
  64. #+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js
  65. ")))
  66. (setq org-roam-dailies-capture-templates
  67. '(("d" "Default" entry (function org-roam-capture--get-point)
  68. "* %?"
  69. :file-name "docs/daily/%<%Y-%m-%d>"
  70. :head
  71. "
  72. #+TITLE: %<%Y-%m-%d>
  73. #+AUTHOR: Christopher James Hayward
  74. ")))
  75. (use-package mu4e
  76. :load-path "/usr/share/emacs/site-lisp/mu4e"
  77. :config
  78. (setq mu4e-change-filenames-when-moving t
  79. mu4e-update-interval (* 5 60) ;; Every 5 minutes.
  80. mu4e-get-mail-command "mbsync -a"
  81. mu4e-maildir "~/.cache/mail"
  82. mu4e-compose-signature
  83. (concat "Chris Hayward\n"
  84. "https://chrishayward.xyz\n"))
  85. ;; Ensure plain text scales for all devices.
  86. (setq mu4e-compose-format-flowed t)
  87. ;; GPG signing key for outbound mail.
  88. (setq mml-secure-openpgp-signers '("37AB1CB72B741E478CA026D43025DCBD46F81C0F"))
  89. (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
  90. (setq message-send-mail-function 'smtpmail-send-it)
  91. ;; Configure mail account(s).
  92. (setq mu4e-contexts
  93. (list
  94. ;; Main
  95. ;; chris@chrishayward.xyz
  96. (make-mu4e-context
  97. :name "Main"
  98. :match-func
  99. (lambda (msg)
  100. (when msg
  101. (string-prefix-p "/Main" (mu4e-message-field msg :maildir))))
  102. :vars
  103. '((user-full-name . "Christopher James Hayward")
  104. (user-mail-address . "chris@chrishayward.xyz")
  105. (smtpmail-smtp-server . "mail.chrishayward.xyz")
  106. (smtpmail-smtp-service . 587)
  107. (smtpmail-stream-type . starttls))))))
  108. (use-package mu4e-alert
  109. :custom
  110. (mu4e-alert-set-default-style 'libnotify)
  111. :config
  112. (mu4e-alert-enable-notifications)
  113. (mu4e-alert-enable-mode-line-display))
  114. (dotfiles/leader
  115. "m" '(mu4e :which-key "Mail"))
  116. (unless (string-match-p "\\.gpg" org-agenda-file-regexp)
  117. (setq org-agenda-file-regexp
  118. (replace-regexp-in-string "\\\\\\.org" "\\\\.org\\\\(\\\\.gpg\\\\)?"
  119. org-agenda-file-regexp)))
  120. (setq org-agenda-files '("~/.emacs.d/docs/"
  121. "~/.emacs.d/docs/daily/"))
  122. (dotfiles/leader
  123. "a" '(org-agenda :which-key "Agenda"))
  124. (use-package gif-screencast
  125. :custom
  126. (gif-screencast-output-directory (concat dotfiles/home "docs/images/")))
  127. (dotfiles/leader
  128. "s" '(:ignore t :which-key "Screencast")
  129. "ss" '(gif-screencast-start-or-stop :which-key "Start / Stop")
  130. "sp" '(gif-screencast-toggle-pause :which-key "Pause"))