Update elfeed

This commit is contained in:
Marcus Kammer 2024-11-09 15:53:34 +01:00
parent 9588156c43
commit 52845afaea

20
init.el
View file

@ -1278,7 +1278,6 @@ Uses `mk/hyperspec-dir-locations' to find the directory."
;; (load "bundle--news")
(use-package elfeed
:bind ("C-x w" . elfeed)
:init (setq elfeed-feeds
'(("https://netzpolitik.org/feed/" netz politik news)
("https://www.marcuskammer.dev/weblog/index.xml" personal)
@ -1382,9 +1381,26 @@ Uses `mk/hyperspec-dir-locations' to find the directory."
:custom
(elfeed-search-filter "@7-day-ago +unread")
:config
;; Play videos from elfeed
(defun elfeed-mpv (&optional use-generic-p)
"Play video link with mpv."
(interactive "P")
(let ((entries (elfeed-search-selected)))
(cl-loop for entry in entries
do (elfeed-untag entry 'unread)
when (elfeed-entry-link entry)
do (start-process-shell-command "elfeed-video" nil (format "mpv \"%s\"" it)))
(mapc #'elfeed-search-update-entry entries)
(unless (use-region-p) (forward-line))))
(let ((feeds (expand-file-name "~/feeds.el")))
(when (file-exists-p feeds)
(load-file feeds))))
(load-file feeds)))
:bind (("C-x w" . elfeed)
:map elfeed-search-mode-map
("v" . 'elfeed-mpv)
("U" . 'elfeed-update)))
;; (load "bundle--calendar")