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.

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