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.

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