summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--attic/misc.org101
1 files changed, 101 insertions, 0 deletions
diff --git a/attic/misc.org b/attic/misc.org
new file mode 100644
index 0000000..f11d36c
--- /dev/null
+++ b/attic/misc.org
@@ -0,0 +1,101 @@
+#+title: Miscellaneous config bits that i don't use anymore
+
+* frm
+ #+begin_src emacs-lisp
+ (use-package jao-frm
+ :init (setq jao-frm-mail-command 'jao-open-gnus-frame))
+
+ (defun jao-frm--formatter (mbox n)
+ (apply #'format "%s/%s: %s" `(,@(last (split-string mbox "/") 2) ,n)))
+
+ (defun jao-frm--show ()
+ (interactive)
+ (jao-frm-show-mail-numbers #'jao-frm--formatter))
+
+ (global-set-key [(f12)] 'jao-frm--show)
+ (global-set-key [(f8)] 'jao-frm)
+
+ #+end_src
+* mu4e
+ #+begin_src emacs-lisp
+ (jao-load-path "mu4e")
+ (use-package mu4e
+ :init
+ (setq mu4e-attachment-dir (expand-file-name "~/var/download/attachments")
+ mu4e-change-filenames-when-moving nil
+ mu4e-completing-read-function 'completing-read
+ mu4e-display-update-status-in-modeline nil
+ mu4e-get-mail-command "true" ;; "run-mb.sh || [ $? -eq 1 ]"
+ mu4e-headers-show-threads t
+ mu4e-headers-sort-direction 'ascending
+ mu4e-headers-visible-columns 100
+ mu4e-headers-visible-lines 12
+ mu4e-hide-index-messages t
+ mu4e-index-cleanup t ;; don't do a full cleanup check
+ mu4e-index-lazy-check t ;; don't consider up-to-date dirs
+ mu4e-maildir "~/var/mail/"
+ mu4e-split-view 'horizontal ;; 'vertical
+ mu4e-update-interval 300
+ mu4e-use-fancy-chars nil
+ mu4e-user-mail-address-list jao-mails
+ mu4e-view-show-addresses t
+ mu4e-view-show-images t
+ jao-mu4e-uninteresting-mail-query
+ (concat
+ "flag:unread AND NOT flag:trashed"
+ " AND NOT (maildir:/bigml/inbox OR maildir:/bigml/bugs OR"
+ " maildir:/bigml/support OR maildir:/jao/inbox)")
+ jao-mu4e-interesting-mail-query
+ (concat
+ "flag:unread AND NOT flag:trashed"
+ " AND (maildir:/bigml/inbox OR maildir:/bigml/bugs OR"
+ " maildir:/bigml/support OR maildir:/jao/inbox)")
+ mu4e-bookmarks
+ `((:name "Inbox" :query ,jao-mu4e-interesting-mail-query :key ?i)
+ (:name "Other messages"
+ :query ,jao-mu4e-uninteresting-mail-query
+ :key 117)
+ (:name "Today's messages" :query "date:today..now"
+ :key 116)
+ (:name "Last 7 days" :query "date:7d..now" :hide-unread t
+ :key 119)
+ (:name "Messages with PDFs"
+ :query "mime:application/pdf OR mime:x-application/pdf"
+ :key 112)))
+
+ :config
+ (defun jao-mu4e--maildir (msg)
+ (when msg
+ (let ((md (mu4e-message-field msg :maildir)))
+ (when (string-match "/\\([^/]+\\)/.*" md)
+ (match-string 1 md)))))
+
+ (defun jao-mu4e--maildir-folder (dir)
+ `(lambda (msg)
+ (format "/%s/%s" (jao-mu4e--maildir msg) ,dir)))
+
+ (defun jao-mu4e--refile-folder (msg)
+ (let ((md (jao-mu4e--maildir msg)))
+ (if (string= md "trove")
+ "/trove/jao"
+ (format "/trove/%" md))))
+
+ (setq mu4e-sent-folder (jao-mu4e--maildir-folder "sent"))
+ (setq mu4e-drafts-folder (jao-mu4e--maildir-folder "trash"))
+ (setq mu4e-trash-folder (jao-mu4e--maildir-folder "trash"))
+ (setq mu4e-refile-folder 'jao-mu4e--refile-folder)
+
+ (setq mu4e-contexts nil)
+
+ (setq mu4e-view-show-images t)
+ (when (fboundp 'imagemagick-register-types)
+ (imagemagick-register-types))
+
+ (define-key mu4e-view-mode-map [remap mu4e-view-verify-msg-popup]
+ 'epa-mail-verify)
+
+ ;; View html message in browser (type aV)
+ (add-to-list 'mu4e-view-actions
+ '("ViewInBrowser" . mu4e-action-view-in-browser) t))
+
+ #+end_src