Move email config over from doom-emacs
This commit is contained in:
parent
ca77fb2d1e
commit
815f603128
2
Makefile
2
Makefile
|
@ -10,7 +10,7 @@ switch:
|
||||||
sudo nixos-rebuild switch --flake .
|
sudo nixos-rebuild switch --flake .
|
||||||
|
|
||||||
mu:
|
mu:
|
||||||
mu init --maildir ~/.mail \
|
mu init --maildir ~/Mail \
|
||||||
--my-address=e.litherlandsmith@proton.me \
|
--my-address=e.litherlandsmith@proton.me \
|
||||||
--my-address=evie@xenia.me.uk \
|
--my-address=evie@xenia.me.uk \
|
||||||
--my-address=evie@litherlandsmith.slmail.me \
|
--my-address=evie@litherlandsmith.slmail.me \
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
imapnotify.enable = true;
|
imapnotify.enable = true;
|
||||||
};
|
};
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
maildirBasePath = ".mail";
|
maildirBasePath = "Mail";
|
||||||
accounts = let realName = "Evie Litherland-Smith";
|
accounts = let realName = "Evie Litherland-Smith";
|
||||||
in {
|
in {
|
||||||
proton = let
|
proton = let
|
||||||
|
|
|
@ -61,6 +61,10 @@
|
||||||
auctex
|
auctex
|
||||||
auctex-latexmk
|
auctex-latexmk
|
||||||
|
|
||||||
|
# custom-email-packages
|
||||||
|
mu4e
|
||||||
|
mu4e-alert
|
||||||
|
|
||||||
# Additional packages
|
# Additional packages
|
||||||
magit
|
magit
|
||||||
vterm
|
vterm
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
|
|
||||||
;;; Configuration phase
|
;;; Configuration phase
|
||||||
|
|
||||||
;; Some example modules to configure Emacs. Don't blindly copy these,
|
(require 'custom-email-config)
|
||||||
;; they are here for example purposes. Find the modules which work
|
|
||||||
;; for you and add them here.
|
|
||||||
(require 'crafted-completion-config)
|
(require 'crafted-completion-config)
|
||||||
(require 'crafted-defaults-config)
|
(require 'crafted-defaults-config)
|
||||||
(require 'crafted-ide-config)
|
(require 'crafted-ide-config)
|
||||||
(require 'crafted-org-config)
|
(require 'crafted-org-config)
|
||||||
|
(require 'crafted-speedbar-config)
|
||||||
(require 'crafted-startup-config)
|
(require 'crafted-startup-config)
|
||||||
(require 'crafted-ui-config)
|
(require 'crafted-ui-config)
|
||||||
(require 'crafted-workspaces-packages)
|
(require 'crafted-workspaces-packages)
|
||||||
|
@ -36,7 +36,9 @@
|
||||||
|
|
||||||
(setq user-full-name "Evie Litherland-Smith"
|
(setq user-full-name "Evie Litherland-Smith"
|
||||||
user-mail-address "evie@xenia.me.uk"
|
user-mail-address "evie@xenia.me.uk"
|
||||||
display-line-numbers 'relative)
|
display-line-numbers 'relative
|
||||||
|
fill-column 80)
|
||||||
|
(global-display-fill-column-indicator-mode)
|
||||||
|
|
||||||
;; Theme settings
|
;; Theme settings
|
||||||
(load-theme 'doom-tokyo-night t)
|
(load-theme 'doom-tokyo-night t)
|
||||||
|
@ -45,13 +47,26 @@
|
||||||
(set-frame-parameter nil 'alpha-background 80)
|
(set-frame-parameter nil 'alpha-background 80)
|
||||||
(add-to-list 'default-frame-alist '(alpha-background . 80))
|
(add-to-list 'default-frame-alist '(alpha-background . 80))
|
||||||
|
|
||||||
;; Profile emacs startup
|
;; Extra functions
|
||||||
|
|
||||||
(defun crafted-startup-example/display-startup-time ()
|
(defun crafted-startup-example/display-startup-time ()
|
||||||
"Display the startup time after Emacs is fully initialized."
|
"Display the startup time after Emacs is fully initialized."
|
||||||
(message "Crafted Emacs loaded in %s."
|
(message "Crafted Emacs loaded in %s."
|
||||||
(emacs-init-time)))
|
(emacs-init-time)))
|
||||||
(add-hook 'emacs-startup-hook #'crafted-startup-example/display-startup-time)
|
(add-hook 'emacs-startup-hook #'crafted-startup-example/display-startup-time)
|
||||||
|
|
||||||
|
(defun my/org-move-done-tasks-to-bottom ()
|
||||||
|
"Sort all tasks in the topmost heading by TODO state."
|
||||||
|
(interactive)
|
||||||
|
(save-excursion
|
||||||
|
(while (org-up-heading-safe))
|
||||||
|
(org-sort-entries nil ?o))
|
||||||
|
|
||||||
|
;; Reset the view of TODO items
|
||||||
|
(org-overview)
|
||||||
|
(org-show-entry)
|
||||||
|
(org-show-children))
|
||||||
|
|
||||||
;; Set default coding system (especially for Windows)
|
;; Set default coding system (especially for Windows)
|
||||||
(set-default-coding-systems 'utf-8)
|
(set-default-coding-systems 'utf-8)
|
||||||
(set-terminal-coding-system 'utf-8)
|
(set-terminal-coding-system 'utf-8)
|
||||||
|
|
70
home/emacs/modules/custom-email-config.el
Normal file
70
home/emacs/modules/custom-email-config.el
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
(setq mu4e-maildir "~/Mail"
|
||||||
|
mu4e-attachment-dir "~/Downloads"
|
||||||
|
mu4e-get-mail-command "mbsync --pull-new inboxes"
|
||||||
|
mu4e-update-interval (* 5 60) ; Every 5 minutes
|
||||||
|
mu4e-sent-messages-behavior 'sent
|
||||||
|
mu4e-change-filenames-when-moving t
|
||||||
|
mu4e-alert-modeline-formatter 'mu4e-alert-default-mode-line-formatter
|
||||||
|
sendmail-program (executable-find "msmtp")
|
||||||
|
send-mail-function #'smtpmail-send-it
|
||||||
|
message-sendmail-f-is-evil t
|
||||||
|
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||||
|
message-send-mail-function #'message-send-mail-with-sendmail
|
||||||
|
mu4e-maildir-shortcuts '((:maildir "/Proton/Inbox/" :key ?p)
|
||||||
|
(:maildir "/iCloud/Inbox/" :key ?i)
|
||||||
|
(:maildir "/Outlook/Inbox/" :key ?o))
|
||||||
|
mu4e-modeline-all-read '("R:" . " ")
|
||||||
|
mu4e-modeline-all-clear '("C:" . " ")
|
||||||
|
mu4e-modeline-new-items '("N:" . " ")
|
||||||
|
mu4e-modeline-unread-items '("U:" . " ")
|
||||||
|
mu4e-search-full-label '("F" . " ")
|
||||||
|
mu4e-search-hide-label '("H" . " ")
|
||||||
|
mu4e-search-related-label '("R" . " ")
|
||||||
|
mu4e-search-skip-duplicates-label '("D" . " ")
|
||||||
|
mu4e-search-threaded-label'("T" . " "))
|
||||||
|
|
||||||
|
(require 'mu4e)
|
||||||
|
|
||||||
|
(setq mu4e-contexts
|
||||||
|
(list
|
||||||
|
(make-mu4e-context
|
||||||
|
:name "Proton"
|
||||||
|
:match-func
|
||||||
|
(lambda (msg)
|
||||||
|
(when msg)
|
||||||
|
(string-prefix-p "/Proton" (mu4e-message-field msg :maildir)))
|
||||||
|
:vars
|
||||||
|
'((user-mail-address . "e.litherlandsmith@proton.me")
|
||||||
|
(mu4e-sent-folder . "/Proton/Sent")
|
||||||
|
(mu4e-drafts-folder . "/Proton/Drafts")
|
||||||
|
(mu4e-trash-folder . "/Proton/Trash")
|
||||||
|
(mu4e-refile-folder . "/Proton/Archive"))
|
||||||
|
)
|
||||||
|
(make-mu4e-context
|
||||||
|
:name "iCloud"
|
||||||
|
:match-func
|
||||||
|
(lambda (msg)
|
||||||
|
(when msg)
|
||||||
|
(string-prefix-p "/iCloud" (mu4e-message-field msg :maildir)))
|
||||||
|
:vars
|
||||||
|
'((user-mail-address . "e.litherlandsmith@icloud.com")
|
||||||
|
(mu4e-sent-folder . "/iCloud/Sent")
|
||||||
|
(mu4e-drafts-folder . "/iCloud/Drafts")
|
||||||
|
(mu4e-trash-folder . "/iCloud/Trash")
|
||||||
|
(mu4e-refile-folder . "/iCloud/Archive"))
|
||||||
|
)
|
||||||
|
(make-mu4e-context
|
||||||
|
:name "Outlook"
|
||||||
|
:match-func
|
||||||
|
(lambda (msg)
|
||||||
|
(when msg)
|
||||||
|
(string-prefix-p "/Outlook" (mu4e-message-field msg :maildir)))
|
||||||
|
:vars
|
||||||
|
'((user-mail-address . "evie.litherland-smith@ukaea.uk")
|
||||||
|
(mu4e-sent-folder . "/Outlook/Sent")
|
||||||
|
(mu4e-drafts-folder . "/Outlook/Drafts")
|
||||||
|
(mu4e-trash-folder . "/Outlook/Trash")
|
||||||
|
(mu4e-refile-folder . "/Outlook/Archive"))
|
||||||
|
)
|
||||||
|
))
|
||||||
|
(provide 'custom-email-config)
|
Loading…
Reference in a new issue