diff options
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r-- | custom/jao-custom-gnus.el | 96 |
1 files changed, 43 insertions, 53 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index ce77285..3165372 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -42,51 +42,39 @@ gnus-generate-tree-function 'gnus-generate-horizontal-tree gnus-tree-minimize-window nil) -(when jao-gnus-use-three-panes - - ;; (dolist (m '(calendar-mode org-agenda-mode gnus-group-mode)) - ;; (add-to-list 'display-buffer-alist `((major-mode . ,m) (dedicated t)))) - - (setq calendar-left-margin 6) - - (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))))) +(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))))) ;;;; no blue icon (advice-add 'gnus-mode-line-buffer-identification :override #'identity) @@ -324,8 +312,8 @@ (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 187) +;; (add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) +;; (jao-gnus--set-summary-line 150) (add-to-list 'nnmail-extra-headers 'Cc) (add-to-list 'nnmail-extra-headers 'BCc) @@ -630,12 +618,13 @@ (interactive) (gnus-demon-add-handler 'jao-gnus--scan 5 1)) -(jao-gnus-add-demon) -(gnus-demon-init) - -;; this is, in theory, not needed; but at some point in the way to emacs -;; version 31 this idle timers have ceased to work after a sleep/awake cycle -(add-to-list 'jao-sleep-awake-functions #'jao-gnus-add-demon) +(jao-when-linux + (jao-gnus-add-demon) + ;; (gnus-demon-remove-handler 'jao-gnus--scan) + (gnus-demon-init) + ;; this is, in theory, not needed; but at some point in the way to emacs + ;; version 31 this idle timers have ceased to work after a sleep/awake cycle + (jao-when-linux (add-to-list 'jao-sleep-awake-functions #'jao-gnus-add-demon))) ;;; add-ons ;;;; notifications @@ -785,6 +774,7 @@ (jao-load-path "consult-notmuch") (use-package consult-notmuch + :ensure t :bind (:map gnus-group-mode-map ("S" . #'jao-gnus-consult-notmuch))) ;;; keyboard shortcuts |