summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitignore3
-rw-r--r--custom.el2
-rw-r--r--init.el4
-rw-r--r--settings/sane-defaults.el6
-rw-r--r--settings/setup-custom.el2
-rw-r--r--settings/setup-mu4e.el93
6 files changed, 108 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 20ca76e..b1ccc3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,5 @@ rust-playground/
.extension
emojis
.lsp-session*
-.dap-breakpoints \ No newline at end of file
+.dap-breakpoints
+network-security.data \ No newline at end of file
diff --git a/custom.el b/custom.el
index 21c3e4c..80e6d8c 100644
--- a/custom.el
+++ b/custom.el
@@ -11,7 +11,7 @@
'("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default))
'(flycheck-display-errors-function #'flycheck-pos-tip-error-messages)
'(package-selected-packages
- '(swift-playground-mode swift-mode ccls which-key company-emoji lsp-dart dart-server dart-mode flutter emojify auctex flycheck-aspell elixir-mode add-node-modules-path prettier-js prettier hasklig-mode jq-mode uuidgen restclient erlang rust-mode flymake-go go-mode gradle-mode treemacs-projectile treemacs protobuf-mode yaml-mode web-mode visual-regexp-steroids systemd solarized-theme smart-mode-line slime purescript-mode projectile-ripgrep play-routes-mode paredit org-bullets multiple-cursors modern-cpp-font-lock magit lsp-ui ido-vertical-mode highlight-escape-sequences flycheck-pos-tip flycheck-haskell flycheck-clojure flycheck-clangcheck flx-ido ensime ember-mode elm-mode dockerfile-mode cquery company-lsp company-glsl company-c-headers cmake-mode clojure-snippets clojure-mode-extra-font-locking ace-window))
+ '(unicode-fonts mu4e-marker-icons all-the-icons org-mime swift-playground-mode swift-mode ccls which-key company-emoji lsp-dart dart-server dart-mode flutter emojify auctex flycheck-aspell elixir-mode add-node-modules-path prettier-js prettier hasklig-mode jq-mode uuidgen restclient erlang rust-mode flymake-go go-mode gradle-mode treemacs-projectile treemacs protobuf-mode yaml-mode web-mode visual-regexp-steroids systemd solarized-theme smart-mode-line slime purescript-mode projectile-ripgrep play-routes-mode paredit org-bullets multiple-cursors modern-cpp-font-lock magit lsp-ui ido-vertical-mode highlight-escape-sequences flycheck-pos-tip flycheck-haskell flycheck-clojure flycheck-clangcheck flx-ido ensime ember-mode elm-mode dockerfile-mode cquery company-lsp company-glsl company-c-headers cmake-mode clojure-snippets clojure-mode-extra-font-locking ace-window))
'(safe-local-variable-values '((projectile-project-run-cmd . "./build/jmessageGtk"))))
(custom-set-faces
;; custom-set-faces was added by Custom.
diff --git a/init.el b/init.el
index 0080ff1..9c92b3b 100644
--- a/init.el
+++ b/init.el
@@ -91,6 +91,7 @@
multiple-cursors
nasm-mode
paredit
+ pass
play-routes-mode
projectile
projectile-ripgrep
@@ -163,6 +164,7 @@
(require 'setup-lsp-mode)
(require 'setup-magit)
(require 'setup-markdown-mode)
+(require 'setup-mu4e)
(require 'setup-multiple-cursors)
(require 'setup-org-mode)
(require 'setup-plz-mode)
@@ -180,6 +182,8 @@
(require 'setup-yaml-mode)
(require 'setup-yasnippet)
+;; enable pass as our auth source
+(auth-source-pass-enable)
;; utility globals
(require 'fetch-includes)
diff --git a/settings/sane-defaults.el b/settings/sane-defaults.el
index 3c316d1..cf17758 100644
--- a/settings/sane-defaults.el
+++ b/settings/sane-defaults.el
@@ -19,6 +19,12 @@
(global-set-key (kbd "M-{") 'insert-pair)
(global-set-key (kbd "M-\"") 'insert-pair)
+;; use mu4e by default
+(global-set-key (kbd "C-x m") 'mu4e)
+
+;; use unix pass as our password store
+(setq auth-sources '(password-store))
+
;; Also auto refresh dired, but be quiet about it
(setq global-auto-revert-non-file-buffers t)
(setq auto-revert-verbose nil)
diff --git a/settings/setup-custom.el b/settings/setup-custom.el
index c2454d7..aceedd1 100644
--- a/settings/setup-custom.el
+++ b/settings/setup-custom.el
@@ -1,5 +1,7 @@
;;; setup-custom.el --- non-user specific customizations -*- lexical-binding: t; -*-
+(set-frame-font "Source Code Pro Medium" nil t)
+
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
diff --git a/settings/setup-mu4e.el b/settings/setup-mu4e.el
new file mode 100644
index 0000000..95cdb20
--- /dev/null
+++ b/settings/setup-mu4e.el
@@ -0,0 +1,93 @@
+;;; Code:
+(require 'mu4e)
+(require 'org-mime)
+(require 'org-mu4e)
+(require 'smtpmail)
+
+(setq personal-email (password-store-get-field "mbsync/personal-gmail" "username"))
+
+(setq
+
+ ;; get mail options
+ mu4e-get-mail-command "mbsync -a"
+ mu4e-update-interval 120
+ mu4e-headers-auto-update t
+ mu4e-view-prefer-html t
+
+ ;; Don't save message to Sent Messages, Gmail/IMAP takes care of this
+ ;; Override in context switching for other type of mailboxes
+ mu4e-sent-messages-behavior 'delete
+ message-kill-buffer-on-exit t
+
+ shr-color-visible-luminance-min 40
+
+ mu4e-view-show-images t
+ mu4e-use-fancy-chars t
+
+ ;; This fixes the error 'mbsync error: UID is x beyond highest assigned UID x'
+ mu4e-change-filenames-when-moving t
+
+ user-mail-address personal-email
+ user-full-name "Benj Bellon"
+
+ ;; default to first (personal) context
+ mu4e-context-policy 'pick-first
+ mu4e-compose-context-policy 'pick-first
+
+ ;; Customize the flags to something more sensible.
+ mu4e-headers-flagged-mark '("F" . "⚑")
+ mu4e-headers-unread-mark '("u" . "✉")
+ mu4e-headers-replied-mark '("R" . "←")
+
+ mu4e-date-format "%y/%m/%d"
+ mu4e-headers-date-format "%Y/%m/%d"
+ mu4e-attachment-dir "~/Downloads/.mail-attachments"
+ mu4e-maildir "~/.mail/"
+
+ ;; sendmail options
+ message-send-mail-function 'smtpmail-send-it
+ smtpmail-debug-info t
+ smtpmail-stream-type 'starttls
+ smtpmail-default-smtp-server "smtp.gmail.com")
+
+;; This will ensure the right 'sent from' address and email sign off etc. be
+;; picked up when replying to emails.
+(setq mu4e-contexts
+ `(
+ ,(make-mu4e-context
+ :name "personal"
+ :enter-func (lambda () (mu4e-message "Entering personal account context"))
+ :leave-func (lambda () (mu4e-message "Leaving personal account context"))
+ ;; We match based on the contact-fields of the message
+ :match-func (lambda (msg)
+ (when msg
+ (mu4e-message-contact-field-matches msg :to personal-email)
+ (mu4e-message-contact-field-matches msg :from personal-email)
+ (mu4e-message-contact-field-matches msg :cc personal-email)
+ (mu4e-message-contact-field-matches msg :bcc personal-email)))
+ :vars `((user-mail-address . ,personal-email)
+ (user-full-name . "Benj Bellon")
+
+ (mu4e-drafts-folder . "/personal-gmail/[Gmail]/Drafts")
+ (mu4e-sent-folder . "/personal-gmail/[Gmail]/Sent Mail")
+ (mu4e-trash-folder . "/personal-gmail/[Gmail]/Trash")
+ (mu4e-refile-folder . "/personal-gmail/[Gmail]/All Mail")
+
+ (mu4e-maildir-shortcuts . (("/personal-gmail/INBOX" . ?i)
+ ))
+
+
+ (smtpmail-smtp-user . ,personal-email)
+ (smtpmail-smtp-server . "smtp.gmail.com")
+ (smtpmail-smtp-service . 587)))
+ ))
+
+
+(when (fboundp 'imagemagick-register-types)
+ (imagemagick-register-types))
+
+(add-to-list 'mu4e-view-actions '("View In Browser" . mu4e-action-view-in-browser) t)
+
+
+(provide 'setup-mu4e)
+;;; setup-mu4e.el ends here