aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-init.d/mu4e.el
blob: da8b7c83c9d1659d4397e01126cfe40b09229f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(require 'mu4e)

;; sending mail
(setq message-send-mail-function 'message-send-mail-with-sendmail
      sendmail-program "/home/lur/bin/te-msmtp"
      user-mail-address "raul@thousandeyes.com"
      user-full-name "Raúl Benencia")

(setq mu4e-user-mail-address-list (list "raul@thousandeyes.com"))

(setq message-kill-buffer-on-exit t)
;; Use fancy chars
(setq mu4e-use-fancy-chars t)
;; don't save message to Sent Messages, Gmail/IMAP takes care of this
(setq mu4e-sent-messages-behavior 'delete)
(setq mu4e-update-interval 60)               ;; update every 5 minutes

;; use 'fancy' non-ascii characters in various places in mu4e
;;(setq mu4e-use-fancy-chars t)

(setq relevant-maildirs " (maildir:/INBOX OR maildir:/jira OR maildir:/news OR maildir:/git)")
(mu4e-alert-enable-notifications)
(mu4e-alert-set-default-style 'libnotify)
(setq mu4e-alert-interesting-mail-query
      (concat "flag:unread"
              " AND NOT flag:trashed"
              " AND" relevant-maildirs))

(mu4e-alert-set-default-style 'libnotify)
;;(add-hook 'after-init-hook #'mu4e-alert-enable-notifications)
(add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display)

(setq mu4e-bookmarks
  `(,(make-mu4e-bookmark
       :name  "INBOX"
       :query "maildir:/INBOX"
       :key ?i)
    ,(make-mu4e-bookmark
       :name  "Unread messages"
       :query (concat "flag:unread AND NOT flag:trashed AND" relevant-maildirs)
       :key ?u)
     ,(make-mu4e-bookmark
       :name "Today's messages"
       :query (concat "date:today..now AND" relevant-maildirs)
       :key ?t)
     ,(make-mu4e-bookmark
       :name "Last 7 days"
       :query (concat "date:7d..now AND" relevant-maildirs)
       :key ?w)
     ,(make-mu4e-bookmark
       :name "Today's unread logs "
       :query (concat "date:today..now flag:unread AND NOT" relevant-maildirs)
       :key ?l)
     ,(make-mu4e-bookmark
       :name "Today's logs "
       :query (concat "date:today..now AND NOT maildir:/fim AND NOT" relevant-maildirs)
       :key ?l))
)

;; (require 'mu4e-maildirs-extension)
;; (mu4e-maildirs-extension)
nihil fit ex nihilo