Tweak mu4e

This commit is contained in:
Nathan McCarty 2022-09-06 12:38:29 -04:00
parent 218899921b
commit fb3cf52a1f
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
3 changed files with 42 additions and 20 deletions

View File

@ -375,6 +375,10 @@ work if it thinks it needs to."
'(:name "All Mail" '(:name "All Mail"
:key ?a :key ?a
:query "NOT flag:trashed")) :query "NOT flag:trashed"))
(add-to-list 'mu4e-bookmarks
'(:name "Unread Notifications - nathan@mccarty.io"
:key ?n
:query "maildir:\"/nathan@mccarty.io/Folders/Notifications*\" AND NOT flag:trashed AND flag:unread"))
(add-to-list 'mu4e-bookmarks (add-to-list 'mu4e-bookmarks
'(:name "Inbox - nathan@mccarty.io" '(:name "Inbox - nathan@mccarty.io"
:key ?m :key ?m
@ -384,12 +388,18 @@ work if it thinks it needs to."
:key ?u :key ?u
:query "flag:unread AND NOT flag:trashed"))) :query "flag:unread AND NOT flag:trashed")))
(after! mu4e
(setq mu4e-maildir-shortcuts
'((:maildir "/nathan@mccarty.io/Folders/Notifications/Github" :key ?h)
(:maildir "/nathan@mccarty.io/Folders/Notifications/Gitlab" :key ?l)
(:maildir "/nathan@mccarty.io/Folders/Notifications/SourceHut" :key ?s))))
(after! mu4e (after! mu4e
(mu4e-alert-enable-mode-line-display)) (mu4e-alert-enable-mode-line-display))
(setq +mu4e-backend nil) (setq +mu4e-backend nil)
(after! mu4e (after! mu4e
(setq mu4e-get-mail-command "true" (setq mu4e-get-mail-command "systemctl start --user mbsync.service"
mu4e-update-interval nil)) mu4e-update-interval nil))
(after! mu4e (after! mu4e

View File

@ -592,6 +592,10 @@ Setup our bookmarks, resetting the list of bookmarks first so we can go complete
'(:name "All Mail" '(:name "All Mail"
:key ?a :key ?a
:query "NOT flag:trashed")) :query "NOT flag:trashed"))
(add-to-list 'mu4e-bookmarks
'(:name "Unread Notifications - nathan@mccarty.io"
:key ?n
:query "maildir:\"/nathan@mccarty.io/Folders/Notifications*\" AND NOT flag:trashed AND flag:unread"))
(add-to-list 'mu4e-bookmarks (add-to-list 'mu4e-bookmarks
'(:name "Inbox - nathan@mccarty.io" '(:name "Inbox - nathan@mccarty.io"
:key ?m :key ?m
@ -601,6 +605,14 @@ Setup our bookmarks, resetting the list of bookmarks first so we can go complete
:key ?u :key ?u
:query "flag:unread AND NOT flag:trashed"))) :query "flag:unread AND NOT flag:trashed")))
#+end_src #+end_src
Setup the maildirs we want to see, we'll show our notifications
#+begin_src emacs-lisp
(after! mu4e
(setq mu4e-maildir-shortcuts
'((:maildir "/nathan@mccarty.io/Folders/Notifications/Github" :key ?h)
(:maildir "/nathan@mccarty.io/Folders/Notifications/Gitlab" :key ?l)
(:maildir "/nathan@mccarty.io/Folders/Notifications/SourceHut" :key ?s))))
#+end_src
Tell it to enable the modeline display Tell it to enable the modeline display
#+begin_src emacs-lisp #+begin_src emacs-lisp
(after! mu4e (after! mu4e
@ -610,7 +622,7 @@ Tell it not to update the mail itself, we have a systemd unit for that
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq +mu4e-backend nil) (setq +mu4e-backend nil)
(after! mu4e (after! mu4e
(setq mu4e-get-mail-command "true" (setq mu4e-get-mail-command "systemctl start --user mbsync.service"
mu4e-update-interval nil)) mu4e-update-interval nil))
#+end_src #+end_src
We need to tell mu4e to rename files when they are moved, or else mbsync will break, see [[https://github.com/djcb/mu/issues/613#issuecomment-166714305][issue]] and [[http://tiborsimko.org/mbsync-duplicate-uid.html][blog post]] We need to tell mu4e to rename files when they are moved, or else mbsync will break, see [[https://github.com/djcb/mu/issues/613#issuecomment-166714305][issue]] and [[http://tiborsimko.org/mbsync-duplicate-uid.html][blog post]]

View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1661882940, "lastModified": 1662478528,
"narHash": "sha256-4LaVFnV22WrOA0aolqqk9dXrM8crikcrLQt29G18F7M=", "narHash": "sha256-Myjd0HPL5lXri3NXOcJ6gP7IKod2eMweQBKM4uxgEGw=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "80cec5115aae74accc4ccfb9f84306d7863f0632", "rev": "3b69bf3cc26ae19de847bfe54d6ab22d7381a90a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -62,11 +62,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1662352075, "lastModified": 1662496984,
"narHash": "sha256-xh8VqTB2TZOGqPwjx7Nb1YATvDNWm+fxppSk+1wdX7I=", "narHash": "sha256-SWAuZBAr3soy45+vO2gaRG0XTYO3sQVOMe7aPKqIno0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "3633040a41dc3379b5c4d53a4ec0fc0eb68b236d", "rev": "82704788ffcbf4d1b417b7ce62b9f1ef7d98f442",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -177,11 +177,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1662272813, "lastModified": 1662447736,
"narHash": "sha256-aYTZCnaoW6A2m3mFMvTE8ywob9BmrauW7LBZmxMGceA=", "narHash": "sha256-HMnv/9V5JekVlBCdb4k9CzhW3UHJ1fi41bI5Kwi19EE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "85494959e6b4a7c8e22d56df96a39f6756ca58b2", "rev": "1bdc5042356c21bdf8075dd63f291cf77bb77b92",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -759,11 +759,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1662018862, "lastModified": 1662476795,
"narHash": "sha256-X5pdZ9h2AJ6nVtXI+DSz6CbJNcG1QeMBKjUm2ZMWOAY=", "narHash": "sha256-fNp1vn7yty48BtyC9q+JpzZSD59gLuXuAFTYeJ5o+Ss=",
"owner": "PolyMC", "owner": "PolyMC",
"repo": "PolyMC", "repo": "PolyMC",
"rev": "2f167b1512dc0c3b80731ae412d55ee897da14fd", "rev": "e37f70b9f7e35639f49c2f53f8e82e97f5fbffc9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -848,11 +848,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1662219201, "lastModified": 1662377094,
"narHash": "sha256-cuQJy5L6DNXIK2myVravMja+/Tj/BgyEO4VF33cQNg4=", "narHash": "sha256-0bvOQxEe8nzk/VlhHBrUn/Mz3DlE92Us7JqveVjTe0A=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "8ddb8b7e8ed9fd99f580503b5ee94e8452d57f5e", "rev": "6dfd8aebdfa1ee1824446f01daf5bdb229b32f92",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -886,11 +886,11 @@
"nixpkgs-22_05": "nixpkgs-22_05" "nixpkgs-22_05": "nixpkgs-22_05"
}, },
"locked": { "locked": {
"lastModified": 1662265707, "lastModified": 1662390490,
"narHash": "sha256-nSCTmU6Ol02JMUzueAQGq1B/TC8JLrhrYivFzEmV0iQ=", "narHash": "sha256-HnFHRFu0eoB0tLOZRjLgVfHzK+4bQzAmAmHSzOquuyI=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "00da5de7380e0fc01e009e7ea9eb3f391d4b6e02", "rev": "044ccfe24b349859cd9efc943e4465cc993ac84e",
"type": "github" "type": "github"
}, },
"original": { "original": {