X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=emacs%2F.emacs;h=bf43b9c68aad1913a53f3e18dab9bbe4c3fa47b7;hb=541ca7adb5397879e64a674437aade7cf3833a1a;hp=e6bc5f6d36b77291b3bdd3523939013b78f2dc27;hpb=4d9f38422bf0d994a6bda0b486c43c7e06a01296;p=max%2Fdotfiles.git diff --git a/emacs/.emacs b/emacs/.emacs index e6bc5f6..bf43b9c 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -22,7 +22,7 @@ ("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))) '(package-selected-packages (quote - (yaml-mode minimap js2-mode editorconfig evil-magit evil-leader evil-org molokai-theme org-evil flycheck-mypy jinja2 jinja2-mode highlight-indent-guides projectile helm-projectile zenburn-theme helm helm-config use-package flycheck company-jedi company org evil))) + (yaml-mode minimap js2-mode editorconfig wanderlust evil-magit evil-leader evil-org molokai-theme org-evil flycheck-mypy jinja2 jinja2-mode highlight-indent-guides projectile helm-projectile zenburn-theme helm helm-config use-package flycheck company-jedi company org evil))) '(pdf-view-midnight-colors (quote ("#DCDCCC" . "#383838"))) '(vc-annotate-background "#2B2B2B") '(vc-annotate-color-map @@ -57,6 +57,8 @@ (make-directory "~/.emacs.d/autosaves/" t) (use-package evil + :init + (setq evil-want-C-i-jump nil) :ensure t :config (evil-mode 1)) @@ -94,7 +96,7 @@ :config (add-hook 'prog-mode-hook 'highlight-indent-guides-mode) (setq highlight-indent-guides-method 'character) - (setq highlight-indend-guides-character ?\|) + (setq highlight-indent-guides-character ?\|) (set-face-foreground 'highlight-indent-guides-character-face "darkgray")) (use-package jinja2-mode @@ -129,8 +131,99 @@ (use-package yaml-mode :ensure t) - -(add-hook 'after-init-hook 'global-company-mode) +(use-package mu4e + :config + (setq + mu4e-maildir "~/mail" + mu4e-get-mail-command + (concat "/usr/bin/mbsync -c /home/max/.mbsync/personal.mbsync -a &&" + "/usr/bin/mbsync -c /home/max/.mbsync/personal-gmail.mbsync -a &&" + "/usr/bin/mbsync -c /home/max/.mbsync/aber.mbsync -a") + mu4e-update-interval 60) + ; Force mu4e to rename file on moving + (setq mu4e-change-filenames-when-moving t) + (setq + message-send-mail-function 'smtpmail-send-it + smtpmail-default-smtp-server "mail.friedersdorff.com" + smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg")) + (setq mu4e-drafts-folder "/Drafts") + (setq mu4e-contexts + `( , (make-mu4e-context + :name "Personal" + :enter-func (lambda () (mu4e-message "Switch to Peronal context")) + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg (list :to :cc :bcc) + "max\\+?.*@frie\\(dersdorff\\)?.com"))) + :vars '((user-mail-address . "max@friedersdorff.com") + (user-full-name . "Maximilian Friedersdorff") + (mu4e-sent-folder . "/personal/Sent") + (mu4e-trash-folder . "/personal/Trash") + (smtpmail-smtp-server . "mail.friedersdorff.com") + (smtpmail-smtp-service . 587))), + (make-mu4e-context + :name "Gmail" + :enter-func (lambda () (mu4e-message "Switch to Gmail context")) + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg (list :to :cc :bcc) + "maxf130\\+?.*@gmail.com"))) + :vars '((user-mail-address . "maxf130@gmail.com") + (user-full-name . "Maximilian Friedersdorff") + (mu4e-sent-folder . "/personal-gmail/Sent") + (mu4e-sent-messages-behaviour . 'delete) + (smtpmail-smtp-server . "smtp.gmail.com") + (smtpmail-smtp-service . 587))), + (make-mu4e-context + :name "Aber" + :enter-func (lambda () (mu4e-message "Switch to Aber context")) + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg (list :to :cc :bcc) + "maf54\\+?.*@aber.ac.uk"))) + :vars '((user-mail-address . "maf54@aber.ac.uk") + (user-full-name . "Maximilian Friedersdorff") + (mu4e-sent-folder . "/aber/Sent") + (mu4e-trash-folder . "/aber/Trash") + (smtpmail-smtp-server . "smtp.office365.com") + (smtpmail-smtp-service . 587)))) + + mu4e-context-policy 'pick-first) + (setq mu4e-html2text-command "lynx -stdin -dump -force_html") + (add-to-list 'mu4e-bookmarks + '((concatenate + 'string + "flag:unread " + "AND ( " + "maildir:/personal/Inbox OR " + "maildir:/personal/slackware OR " + "maildir:/personal-gmail/Inbox OR " + "maildir:/aber/Inbox " + ")") "Unread Interesting Messages" ?i) + )) + +(use-package mu4e-alert + :ensure t + :config + (setq mu4e-alert-interesting-mail-query + (concatenate + 'string + "flag:unread " + "AND ( " + "maildir:/personal/Inbox OR " + "maildir:/personal/slackware OR " + "maildir:/personal-gmail/Inbox OR " + "maildir:/aber/Inbox " + ")")) + (mu4e-alert-set-default-style 'notifications) + (add-hook 'after-init-hook #'mu4e-alert-enable-notifications)) + + +;;;(global-company-mode) +;;;(add-hook 'after-init-hook 'global-company-mode) (add-hook 'prog-mode-hook 'electric-pair-mode)