Files
doom.d/+rss.el

36 lines
1.4 KiB
EmacsLisp

;;; +rss.el -*- lexical-binding: t; -*-
;; Elfeed configuration
;;
;; Tweak appeareance of the main page
(setq elfeed-sort-order 'ascending
elfeed-search-filter "@all +unread"
elfeed-goodies/tag-column-width 0)
;; Synchronize elfeed with Miniflux
(use-package! elfeed-protocol
:after elfeed
:config
(setq elfeed-use-curl t
elfeed-protocol-enabled-protocols '(fever)
elfeed-protocol-feeds (list
(list "fever+https://coolneng@rss.psydnd.org"
:api-url "https://rss.psydnd.org/fever/"
:password (auth-source-pass-get 'secret "api/miniflux"))))
(elfeed-protocol-enable))
;; Update RSS feeds on startup
(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
;; Use different font and show article in fullscreen
(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 "Lato" :height 1.1))
(set-buffer-modified-p nil)))