Added mu4e config on Emacs
This commit is contained in:
@@ -101,11 +101,50 @@
|
||||
:commands (which-key-mode)
|
||||
:init (which-key-mode))
|
||||
|
||||
;; Configuration for mu4e, an interface for mu email index, running inside Emacs
|
||||
(use-package mu4e
|
||||
:ensure nil
|
||||
;; :load-path "/usr/share/emacs/site-lisp/mu4e/"
|
||||
:defer 20 ; Wait until 20 seconds after startup
|
||||
:bind (:map global-map ("C-c e" . mu4e))
|
||||
:config
|
||||
|
||||
;; This is set to 't' to avoid mail syncing issues when using mbsync
|
||||
(setq mu4e-change-filenames-when-moving t)
|
||||
|
||||
;; Refresh mail using isync every 10 minutes
|
||||
(setq mu4e-update-interval (* 10 60))
|
||||
(setq mu4e-get-mail-command "~/.config/emacs/scripts/email_sync.sh")
|
||||
(setq mu4e-maildir "~/Maildir")
|
||||
|
||||
(setq mu4e-drafts-folder "/[Gmail]/Bozze")
|
||||
(setq mu4e-sent-folder "/[Gmail]/Posta inviata")
|
||||
(setq mu4e-refile-folder "/[Gmail]/Tutti i messaggi")
|
||||
(setq mu4e-trash-folder "/[Gmail]/Cestino")
|
||||
(setq user-email-address "fabio.scottodisantolo@gmail.com")
|
||||
(setq user-full-name "Fabio Scotto di Santolo")
|
||||
|
||||
(setq mu4e-maildir-shortcuts
|
||||
'(("/Inbox" . ?i)
|
||||
("/[Gmail]/Posta inviata" . ?s)
|
||||
("/[Gmail]/Cestino" . ?t)
|
||||
("/[Gmail]/Bozze" . ?d)
|
||||
("/[Gmail]/Tutti i messaggi" . ?a))))
|
||||
|
||||
(setq sendmail-program "/usr/bin/msmtp"
|
||||
send-mail-function 'sendmail-send-it
|
||||
message-sendmail-f-is-evil t
|
||||
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||
message-send-mail-function 'message-send-mail-with-sendmail)
|
||||
|
||||
;; Terminal
|
||||
(use-package vterm
|
||||
:ensure t)
|
||||
:ensure t
|
||||
:bind (:map global-map
|
||||
("C-c t" . vterm)
|
||||
("C-c c" . vterm-copy-mode)))
|
||||
|
||||
;; Git package
|
||||
;; Git plugin
|
||||
(use-package magit
|
||||
:ensure t
|
||||
:bind (:map global-map ("M-G" . magit-status)))
|
||||
@@ -131,15 +170,11 @@
|
||||
(keymap-set hl-todo-mode-map "C-c o" #'hl-todo-occur)
|
||||
(keymap-set hl-todo-mode-map "C-c i" #'hl-todo-insert)
|
||||
|
||||
(with-eval-after-load 'magit
|
||||
(add-hook 'magit-log-wash-summary-hook
|
||||
#'hl-todo-search-and-highlight t)
|
||||
(add-hook 'magit-revision-wash-message-hook
|
||||
#'hl-todo-search-and-highlighthl t))
|
||||
|
||||
;; Highlight for i3 config file
|
||||
(use-package i3wm-config-mode
|
||||
:ensure t)
|
||||
|
||||
;; Add autocomplete feature to Emacs
|
||||
(use-package company
|
||||
:ensure t
|
||||
:commands (global-company-mode)
|
||||
|
||||
7
emacs/.config/emacs/scripts/email_sync.sh
Executable file
7
emacs/.config/emacs/scripts/email_sync.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
mbsync Gmail & pid1=$!
|
||||
wait $pid1
|
||||
|
||||
mu index
|
||||
|
||||
21
emacs/.mbsyncrc
Normal file
21
emacs/.mbsyncrc
Normal file
@@ -0,0 +1,21 @@
|
||||
IMAPStore Gmail-remote
|
||||
Host imap.gmail.com
|
||||
Port 993
|
||||
User fabio.scottodisantolo@gmail.com
|
||||
PassCmd "gpg -q -d /home/fscotto/.cache/gmail1.gpg"
|
||||
SSLType IMAPS
|
||||
SSLVersions TLSv1.2 TLSv1.3
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore Gmail-local
|
||||
Path ~/Maildir/GmailAccount/
|
||||
Inbox ~/Maildir/GmailAccount/Inbox
|
||||
SubFolders Verbatim
|
||||
|
||||
Channel Gmail
|
||||
Far :Gmail-remote:
|
||||
Near :Gmail-local:
|
||||
Patterns *
|
||||
Create Both
|
||||
Expunge Both
|
||||
SyncState *
|
||||
30
emacs/.msmtprc
Normal file
30
emacs/.msmtprc
Normal file
@@ -0,0 +1,30 @@
|
||||
# Set default values for all following accounts.
|
||||
defaults
|
||||
|
||||
# Always use TLS
|
||||
tls on
|
||||
|
||||
# Set a list of trusted CAs for TLS. The default is to use system settings,
|
||||
# but you can select your own file.
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile ~/.config/msmtp/msmtp.log
|
||||
|
||||
# Account Gmail
|
||||
account gmail
|
||||
|
||||
# Host name of the SMTP server
|
||||
host smtp.gmail.com
|
||||
|
||||
# Use the mail submission port 587 instead of the SMTP port 25.
|
||||
port 587
|
||||
|
||||
# Envelop-from address
|
||||
from fabio.scottodisantolo@gmail.com
|
||||
|
||||
# Authentication. The password is given using one of five methods
|
||||
auth on
|
||||
user fabio.scottodisantolo@gmail.com
|
||||
passwordeval "gpg -q -d /home/fscotto/.cache/gmail1.gpg"
|
||||
|
||||
# Set a default account
|
||||
account default : gmail
|
||||
Reference in New Issue
Block a user