From d872172bc6856230a67d197e1a10789a279060a1 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 23 Feb 2023 00:02:15 +0100 Subject: [PATCH] Improve readability of elfeed entries --- config.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/config.el b/config.el index 4508535..022cbdb 100644 --- a/config.el +++ b/config.el @@ -115,7 +115,23 @@ elfeed-search-filter "@all +unread" elfeed-goodies/tag-column-width 0) (elfeed-protocol-enable) - (add-hook! 'elfeed-search-mode-hook 'elfeed-update)) + (add-hook! 'elfeed-search-mode-hook 'elfeed-update) + ;; Use different font and show article in fullscreen + (setq elfeed-show-mode-hook + (lambda () + (set-face-attribute 'variable-pitch (selected-frame) :font (font-spec :family "Bitter" :size 28)) + (setq fill-column 120) + (setq elfeed-show-entry-switch #'my-show-elfeed))) + (defun my-show-elfeed (buffer) + (with-current-buffer buffer + (setq buffer-read-only nil) + (goto-char (point-min)) + (re-search-forward "\n\n") + (fill-individual-paragraphs (point) (point-max)) + (setq buffer-read-only t) + (setq visual-fill-column-center-text t) + (visual-fill-column-mode 1)) + (switch-to-buffer buffer))) ;; Set up the mail stack (after! mu4e (load! "+mail")) ;; HACK Enable AOT native compilation