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)
|
(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
|
;; Use different font and show article in fullscreen
|
||||||
(setq elfeed-show-mode-hook
|
(setq elfeed-show-entry-switch #'switch-to-buffer)
|
||||||
(lambda ()
|
(defadvice! +rss-elfeed-wrap-h-nicer ()
|
||||||
(set-face-attribute 'variable-pitch (selected-frame) :font (font-spec :family "Bitter" :size 28))
|
"Enhances an elfeed entry's readability by wrapping it to a width of
|
||||||
(setq fill-column 120)
|
`fill-column' and centering it with `visual-fill-column-mode'."
|
||||||
(setq elfeed-show-entry-switch #'my-show-elfeed)))
|
:override #'+rss-elfeed-wrap-h
|
||||||
(defun my-show-elfeed (buffer)
|
(setq-local truncate-lines nil
|
||||||
(with-current-buffer buffer
|
shr-width 160
|
||||||
(setq buffer-read-only nil)
|
visual-fill-column-center-text t
|
||||||
(goto-char (point-min))
|
default-text-properties '(line-height 1.1))
|
||||||
(re-search-forward "\n\n")
|
(let ((inhibit-read-only t)
|
||||||
(fill-individual-paragraphs (point) (point-max))
|
(inhibit-modification-hooks t))
|
||||||
(setq buffer-read-only t)
|
(visual-fill-column-mode)
|
||||||
(setq visual-fill-column-center-text t)
|
(setq-local shr-current-font '(:family "Raleway" :height 1.1))
|
||||||
(visual-fill-column-mode 1))
|
(set-buffer-modified-p nil))))
|
||||||
(switch-to-buffer buffer)))
|
|
||||||
;; Set up the mail stack
|
;; Set up the mail stack
|
||||||
(after! mu4e (load! "+mail"))
|
(after! mu4e (load! "+mail"))
|
||||||
;; HACK Enable AOT native compilation
|
;; HACK Enable AOT native compilation
|
||||||
|
|
Loading…
Reference in New Issue