summaryrefslogtreecommitdiffstats
path: root/.emacs.d/jd/jd-mu4e.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/jd/jd-mu4e.el')
-rwxr-xr-x.emacs.d/jd/jd-mu4e.el137
1 files changed, 67 insertions, 70 deletions
diff --git a/.emacs.d/jd/jd-mu4e.el b/.emacs.d/jd/jd-mu4e.el
index cb81c5c..aa0355c 100755
--- a/.emacs.d/jd/jd-mu4e.el
+++ b/.emacs.d/jd/jd-mu4e.el
@@ -1,86 +1,83 @@
1(when (not jd/guix-p) 1;;; Dotfiles --- Jakub Dlugosz emacs config
2 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")) 2;;; Commentary:
3 3
4(jd/use-package htmlize "emacs-htmlize") 4;;; Code:
5
6(use-package! htmlize "emacs-htmlize")
5 7
6(jd/add-package-to-manifest "isync") 8(jd/add-package-to-manifest "isync")
7 9
8(jd/use-package mu4e "mu" 10(use-package! mu4e "mu"
9 :defer 10 11 :defer 10
10 :ensure nil 12 :ensure nil
11 :bind 13 :bind
12 ("C-c M" . mu4e) 14 ("C-c M" . mu4e)
13 :config 15 :config
14 ;a (require 'org-mu4e) 16 ;a (require 'org-mu4e)
15 17
16 (if jd/guix-p 18 (unless jd/guix-p
17 (setq mu4e-mu-binary "/home/jakub/.guix-extra-profiles/emacs/emacs/bin/mu") 19 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
18 (setq mu4e-mu-binary "/usr/local/bin/mu")) 20 (setq mu4e-mu-binary "/usr/local/bin/mu"))
19
20 (setq mu4e-update-interval (* 10 60))
21 (setq mu4e-get-mail-command "mbsync -a")
22 (setq mu4e-maildir "~/Mail")
23 21
24 (setq mu4e-completing-read-function #'ivy-completing-read) 22 (setq mu4e-update-interval (* 10 60))
23 (setq mu4e-get-mail-command "mbsync -a")
24 (setq mu4e-maildir "~/Mail")
25 25
26 (setq mu4e-change-filenames-when-moving t) 26 (setq mu4e-completing-read-function #'ivy-completing-read)
27 27
28 (setq mu4e-contexts 28 (setq mu4e-change-filenames-when-moving t)
29 `(,(make-mu4e-context
30 :name "Abaks"
31 :match-func (lambda (msg) (when msg
32 (string-prefix-p "/abaks" (mu4e-message-field msg :maildir))))
33 :vars '(
34 (user-full-name . "Jakub Dlugosz")
35 (user-mail-address . "jakub@abaks.pl")
36 (mu4e-sent-folder . "/abaks/Sent Items")
37 (mu4e-trash-folder . "/abaks/Trash")
38 (mu4e-drafts-folder . "/abaks/Drafts")
39 (mu4e-refile-folder . "/abaks/Archive")
40 (mu4e-sent-messages-behavior . sent)
41 (smtpmail-local-domain . "pl")
42 (smtpmail-smtp-server . "smtp.abaks.pl")
43 (smtpmail-smtp-user . "jakub@abaks.pl")))
44 ,(make-mu4e-context
45 :name "Gmail"
46 :match-func (lambda (msg) (when msg
47 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
48 :vars '(
49 (user-full-name . "Jakub Dlugosz")
50 (user-mail-address . "jdlugosz963@gmail.com")
51 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
52 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
53 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
54 (mu4e-refile-folder . "/gmail/Archive")
55 (smtpmail-local-domain . "com")
56 (smtpmail-smtp-server . "smtp.gmail.com")
57 (smtpmail-smtp-user . "jdlugosz963@gmail.com")
58 (mu4e-sent-messages-behavior . sent)))))
59 29
60 (setq mail-user-agent 'mu4e-user-agent 30 (setq mu4e-contexts
61 mail-host-address nil 31 `(,(make-mu4e-context
62 message-send-mail-function 'smtpmail-send-it 32 :name "Abaks"
63 smtpmail-smtp-service 465 33 :match-func (lambda (msg) (when msg
64 smtpmail-stream-type 'ssl 34 (string-prefix-p "/abaks" (mu4e-message-field msg :maildir))))
65 smtpmail-servers-requiring-authorization ".*") 35 :vars '(
36 (user-full-name . "Jakub Dlugosz")
37 (user-mail-address . "jakub@abaks.pl")
38 (mu4e-sent-folder . "/abaks/Sent Items")
39 (mu4e-trash-folder . "/abaks/Trash")
40 (mu4e-drafts-folder . "/abaks/Drafts")
41 (mu4e-refile-folder . "/abaks/Archive")
42 (mu4e-sent-messages-behavior . sent)
43 (smtpmail-local-domain . "pl")
44 (smtpmail-smtp-server . "smtp.abaks.pl")
45 (smtpmail-smtp-user . "jakub@abaks.pl")))
46 ,(make-mu4e-context
47 :name "Gmail"
48 :match-func (lambda (msg) (when msg
49 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
50 :vars '(
51 (user-full-name . "Jakub Dlugosz")
52 (user-mail-address . "jdlugosz963@gmail.com")
53 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
54 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
55 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
56 (mu4e-refile-folder . "/gmail/Archive")
57 (smtpmail-local-domain . "com")
58 (smtpmail-smtp-server . "smtp.gmail.com")
59 (smtpmail-smtp-user . "jdlugosz963@gmail.com")
60 (mu4e-sent-messages-behavior . sent)))))
66 61
67 (setq mu4e-compose-signature (concat 62 (setq mail-user-agent 'mu4e-user-agent
68 "Pozdrawiam,\n" 63 mail-host-address nil
69 "Jakub Długosz")) 64 message-send-mail-function 'smtpmail-send-it
65 smtpmail-smtp-service 465
66 smtpmail-stream-type 'ssl
67 smtpmail-servers-requiring-authorization ".*")
70 68
71 (mu4e t) 69 (setq mu4e-compose-signature (concat
72 (mu4e-modeline-mode nil)) 70 "Pozdrawiam,\n"
71 "Jakub Długosz"))
73 72
74(jd/use-package mu4e-alert "emacs-mu4e-alert" 73 (mu4e t)
75 :defer 20 74 (mu4e-modeline-mode nil))
76 :config
77 (mu4e-alert-set-default-style 'libnotify)
78 (mu4e-alert-enable-mode-line-display)
79 (mu4e-alert-enable-notifications)
80 75
81 (jd/leader-key-def 76(use-package! mu4e-alert "emacs-mu4e-alert"
82 "m" '(:ignore t :which-key "mail") 77 :defer 20
83 "mm" 'mu4e 78 :config
84 "mc" 'mu4e-compose-new)) 79 (mu4e-alert-set-default-style 'libnotify)
80 (mu4e-alert-enable-mode-line-display)
81 (mu4e-alert-enable-notifications))
85 82
86(provide 'jd-mu4e) 83(provide 'jd-mu4e)