From c55eacb97537c988721badec2f7676e5fd2f4830 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 16 Oct 2026 23:41:23 +0100 Subject: notmuch: nicer hello --- custom/jao-custom-notmuch.el | 13 +++++++++---- lib/net/jao-notmuch.el | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 0cb60e7..6b5be84 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -106,10 +106,14 @@ (+ c (or (plist-get q :count) 0))) searches 0))) - (title (if title (format "[ %d %s ]\n\n" cnt title) "\n")) + (title (when title (format "%d %s" cnt title))) (notmuch-column-control 1.0)) - (widget-insert (propertize title 'face 'jao-themes-f00)) - (notmuch-hello-insert-buttons searches)))) + (when title + (widget-insert (propertize title 'face 'jao-themes-f00)) + (newline) + (jao-notmuch-hbar 5)) + (notmuch-hello-insert-buttons searches) + (newline)))) (defun jao-notmuch--replace (lst s) (let ((name (plist-get s :name))) @@ -339,7 +343,8 @@ (unless (widget-at) (jao-notmuch-hello-first)) (jao-minibuffer-refresh)))) -(defvar jao-notmuch-hello--sec-rx "^\\(\\[ [0-9]+\\|All tags:.+\\)") +;; (defvar jao-notmuch-hello--sec-rx "^\\(\\[ [0-9]+\\|All tags:.+\\)") +(defvar jao-notmuch-hello--sec-rx "^[0-9]+ .+") (defun jao-notmuch-hello-next-section () (interactive) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 254e4b2..f7829e5 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -409,6 +409,11 @@ (t " ")))) (provide 'jao-notmuch) +;;; bars +(defun jao-notmuch-hbar (margin) + (widget-insert (propertize (make-string (- (window-width) margin) ?—) + 'face '(:foreground "grey80"))) + (newline)) ;;; org links (defun jao-notmuch-id-file-name (id) (let ((cmd (format "notmuch search --output=files id:%s" id))) -- cgit v1.2.3