Simplify enhanced elfeed entry visualization
This commit is contained in:
parent
d65a20323d
commit
f7baa0c089
29
config.el
29
config.el
|
@ -118,21 +118,20 @@
|
|||
(elfeed-protocol-enable)
|
||||
(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)))
|
||||
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
||||
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
||||
"Enhances an elfeed entry's readability by wrapping it to a width of
|
||||
`fill-column' and centering it with `visual-fill-column-mode'."
|
||||
:override #'+rss-elfeed-wrap-h
|
||||
(setq-local truncate-lines nil
|
||||
shr-width 160
|
||||
visual-fill-column-center-text t
|
||||
default-text-properties '(line-height 1.1))
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-modification-hooks t))
|
||||
(visual-fill-column-mode)
|
||||
(setq-local shr-current-font '(:family "Raleway" :height 1.1))
|
||||
(set-buffer-modified-p nil))))
|
||||
;; Set up the mail stack
|
||||
(after! mu4e (load! "+mail"))
|
||||
;; HACK Enable AOT native compilation
|
||||
|
|
Loading…
Reference in New Issue