From 88d27fd007cd89f316c3db8c4e6e51dbb363afd4 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 6 Oct 2025 18:53:17 +0100 Subject: bbdb layout, gnus layouts --- custom/jao-custom-email.el | 13 ++++++ custom/jao-custom-eww.el | 2 +- custom/jao-custom-gnus.el | 104 ++++++++++++++++++++++++------------------- custom/jao-custom-notmuch.el | 8 +++- 4 files changed, 77 insertions(+), 50 deletions(-) (limited to 'custom') diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el index 13deeef..262b312 100644 --- a/custom/jao-custom-email.el +++ b/custom/jao-custom-email.el @@ -233,6 +233,7 @@ :ensure t :init (setq bbdb-complete-name-allow-cycling t bbdb-completion-display-record nil + bbdb-dedicated-window t bbdb-gui t bbdb-message-all-addresses t bbdb-complete-mail-allow-cycling t @@ -263,6 +264,18 @@ ("Cc" . ,jao-mails-regexp) ("BCc" . ,jao-mails-regexp)) bbdb-ignore-message-alist bbdb-auto-notes-ignore-messages) + + (setq bbdb-layout-alist + '((one-line (order phone mail-alias mail notes) + (name-end . 24) + (toggle . t)) + (multi-line (omit uuid creation-date timestamp name-format name-face) + (toggle . t) + (indentation . 4)) + (pop-up-multi-line + (omit uuid creation-date timestamp name-format name-face) + (indentation . 4)) + (full-multi-line (indentation . 4)))) :config (add-hook 'message-setup-hook 'bbdb-mail-aliases) ;; (add-hook 'bbdb-notice-mail-hook 'bbdb-auto-notes) diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el index c388437..a6fb342 100644 --- a/custom/jao-custom-eww.el +++ b/custom/jao-custom-eww.el @@ -24,7 +24,7 @@ ;;; multipart html renderer (defun jao-shr-html-renderer (handle) - (let* ((w (min 150 (- (window-width) 10))) + (let* ((w (min 120 (- (window-width) 10))) (fill-column nil) (shr-width w) (shr-max-width w)) diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index e62b249..9ff71aa 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -46,45 +46,47 @@ (setq calendar-left-margin 6) -(if jao-gnus-use-three-panes - (let ((side-bar `(vertical 1.0 - ("inbox.org" 0.4) - ("*Org Agenda*" 1.0) - ("*Calendar*" ,(jao-d-l 9 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)))) +(defun jao-gnus-use-three-panes () + (let ((side-bar `(vertical 1.0 + ("inbox.org" 0.4) + ("*Org Agenda*" 1.0) + ("*Calendar*" ,(jao-d-l 9 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))))) + +(defun jao-gnus-use-two-panes () (let ((wide-len jao-gnus-wide-width) (groups-len jao-gnus-groups-width) (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) @@ -97,13 +99,15 @@ (article 1.0))))) ;; (gnus-add-configuration - ;; `(group (horizontal 1.0 (group ,wide-len point)))) + ;; `(group (horizontal 1.0 + ;; (group 0.5 point) + ;; ("*notmuch-hello*" 1.0)))) - (gnus-add-configuration - `(message (horizontal 1.0 (message ,wide-len point)))) + ;; (gnus-add-configuration + ;; `(message (horizontal 1.0 (message 1.0 point)))) - (gnus-add-configuration - `(reply-yank (horizontal 1.0 (message ,wide-len point)))) + ;; (gnus-add-configuration + ;; `(reply-yank (horizontal 1.0 (message 1.0 point)))) (gnus-add-configuration `(summary @@ -117,6 +121,10 @@ (message ,(- wide-len 100) point) (article 100)))))) +(if jao-gnus-use-three-panes + (jao-gnus-use-three-panes) + (jao-gnus-use-two-panes)) + ;;;; no blue icon (advice-add 'gnus-mode-line-buffer-identification :override #'identity) (setq gnus-mode-line-image-cache nil) @@ -627,6 +635,7 @@ (defun jao-gnus--scan () (let ((inhibit-message t)) (gnus-demon-scan-news) + (jao-shell-exec "notmuch-gnus-tags.sh") (jao-gnus--notify))) (defun jao-gnus--scan-local-mail () @@ -656,7 +665,8 @@ (defvar jao-gnus-tracked-groups (let ((feeds (thread-first (directory-files mail-source-directory nil "feeds\\.[^e]") - (seq-difference '("feeds.trove"))))) + (seq-difference + '("feeds.trove" "feeds.emacs" "feeds.emacs-devel"))))) `( ;; ("nnml:bigml\\.inbox" "B" jao-themes-f00) ;; ("nnml:bigml\\.alba" "A" jao-themes-f00) @@ -668,10 +678,10 @@ ("nnml:jao\\.\\(inbox\\|trove\\)" "I" jao-themes-f01) ("nnml:jao.hunting" "H" jao-themes-f02) ("nnml:jao.write" "W" jao-themes-warning) - ("nnml:jao.[^ithw]" "J" jao-themes-dimm) + ("nnml:jao.[^ithwb]" "J" jao-themes-dimm) ("nnml:jao.hacking" "J" jao-themes-dimm) (,(format "^nnml:%s" (regexp-opt feeds)) "F" jao-themes-dimm) - ;; ("feeds\\.e" "E" jao-themes-dimm) + ("feeds\\.emacs" "E" jao-themes-dimm) ("nnml:local" "l" jao-themes-dimm) ("nnrss:.*" "R" jao-themes-dimm) ("^\\(gwene\\|gmane\\)\\." "N" jao-themes-dimm)))) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index a0dba56..6f44d51 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -496,8 +496,12 @@ (add-hook 'notmuch-tree-process-exit-functions #'jao-notmuch-tree--sentinel) - (advice-add 'notmuch-tree :before #'jao-notmuch-before-tree) - (advice-add 'notmuch-tree-quit :after #'jao-notmuch-after-tree-quit) + (defun jao-notmuch-use-two-panes () + (interactive) + (advice-add 'notmuch-tree :before #'jao-notmuch-before-tree) + (advice-add 'notmuch-tree-quit :after #'jao-notmuch-after-tree-quit)) + + (when jao-notmuch-enabled (jao-notmuch-use-two-panes)) :bind (:map notmuch-tree-mode-map (("b" . jao-notmuch-browse-urls) -- cgit v1.2.3