diff options
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r-- | custom/jao-custom-gnus.el | 114 |
1 files changed, 78 insertions, 36 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 3165372..ec6c761 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -30,11 +30,13 @@ nndraft-directory (jao-gnus-dir "drafts") nnrss-directory (jao-gnus-dir "rss")) +(setq gnus-uncacheable-groups "^nnml") + ;;; looks ;;;; verbosity (setq gnus-verbose 4) ;;;; geometry -(defvar jao-gnus-use-three-panes t) +(defvar jao-gnus-use-three-panes (not jao-notmuch-enabled)) (defvar jao-gnus-groups-width 50) (defvar jao-gnus-wide-width 190) @@ -44,37 +46,76 @@ (setq calendar-left-margin 6) -(let ((wide-len jao-gnus-wide-width) - (groups-len jao-gnus-groups-width) - (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) - (gnus-add-configuration - `(article - (horizontal 1.0 - (vertical ,groups-len (group 1.0)) - (vertical 1.0 - (summary 0.25 point) - (article 1.0))))) - - ;; (gnus-add-configuration - ;; `(group (horizontal 1.0 (group ,wide-len point)))) - - (gnus-add-configuration - `(message (horizontal 1.0 (message ,wide-len point)))) - - (gnus-add-configuration - `(reply-yank (horizontal 1.0 (message ,wide-len point)))) - - (gnus-add-configuration - `(summary - (horizontal 1.0 - (vertical ,groups-len (group 1.0)) - (vertical 1.0 (summary 1.0 point))))) - - (gnus-add-configuration - `(reply - (horizontal 1.0 - (message ,(- wide-len 100) point) - (article 100))))) +(if jao-gnus-use-three-panes + (let ((side-bar '(vertical 1.0 + ("inbox.org" 0.4) + ("*Org Agenda*" 1.0) + ("*Calendar*" 8))) + (wide-len jao-gnus-wide-width) + (groups-len jao-gnus-groups-width) + (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) + (gnus-add-configuration + `(article + (horizontal 1.0 + (vertical ,groups-len (group 1.0)) + (vertical ,summary-len + (summary 0.25 point) + (article 1.0)) + ,side-bar))) + + (gnus-add-configuration + `(group (horizontal 1.0 (group ,wide-len point) ,side-bar))) + + (gnus-add-configuration + `(message (horizontal 1.0 (message ,wide-len point) ,side-bar))) + + (gnus-add-configuration + `(reply-yank (horizontal 1.0 (message ,wide-len point) ,side-bar))) + + (gnus-add-configuration + `(summary + (horizontal 1.0 + (vertical ,groups-len (group 1.0)) + (vertical ,summary-len (summary 1.0 point)) + ,side-bar))) + + (gnus-add-configuration + `(reply + (horizontal 1.0 + (message ,(- wide-len 100) point) + (article 100) + ,side-bar)))) + (let ((wide-len jao-gnus-wide-width) + (groups-len jao-gnus-groups-width) + (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) + (gnus-add-configuration + `(article + (horizontal 1.0 + (vertical ,groups-len (group 1.0)) + (vertical 1.0 + (summary 0.25 point) + (article 1.0))))) + + ;; (gnus-add-configuration + ;; `(group (horizontal 1.0 (group ,wide-len point)))) + + (gnus-add-configuration + `(message (horizontal 1.0 (message ,wide-len point)))) + + (gnus-add-configuration + `(reply-yank (horizontal 1.0 (message ,wide-len point)))) + + (gnus-add-configuration + `(summary + (horizontal 1.0 + (vertical ,groups-len (group 1.0)) + (vertical 1.0 (summary 1.0 point))))) + + (gnus-add-configuration + `(reply + (horizontal 1.0 + (message ,(- wide-len 100) point) + (article 100)))))) ;;;; no blue icon (advice-add 'gnus-mode-line-buffer-identification :override #'identity) @@ -185,7 +226,7 @@ (setq mail-sources (let* ((pwd (auth-source-pick-first-password :host "proton-bridge")) (mds (mapcar (lambda (f) - `(maildir :path ,(expand-file-name f "~/var/mail/"))) + `(maildir :path ,(expand-file-name f jao-maildir))) '("local/" "feeds/"))) (ims (mapcar (lambda (b) `(imap :server "127.0.0.1" :port 1143 @@ -308,12 +349,13 @@ "\n")) (defun jao-gnus--set-summary-line (&optional w) - (let* ((d (if jao-gnus-use-three-panes (+ jao-gnus-groups-width 11) 12)) + (let* ((d (if jao-gnus-use-three-panes + (+ jao-gnus-groups-width 11) + (+ jao-gnus-groups-width 12))) (w (- (or w (window-width)) d))) (setq gnus-summary-line-format (format jao-gnus--summary-line-fmt w)))) -;; (add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) -;; (jao-gnus--set-summary-line 150) +(add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) (add-to-list 'nnmail-extra-headers 'Cc) (add-to-list 'nnmail-extra-headers 'BCc) |