From 7582c959ab3205a1bcdad70fd53ba653ab6dbd8b Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 28 Feb 2023 20:11:29 +0200 Subject: emacs: Update elfeed, add elfeed-mpv functions and youtube feeds --- .emacs.d/init.el | 59 ++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 10 deletions(-) (limited to '.emacs.d/init.el') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 9e5f893..7cd1f9b 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -877,16 +877,55 @@ you have the correctly set the OPENAI_API_KEY variable" (require 'elfeed-goodies) (setq elfeed-feeds (quote ( - ("https://hackaday.com/blog/feed/" hackaday linux) - ("https://www.thanosapollo.com/public/feed.xml" Thanos) - ("https://protesilaos.com/news.xml" Protesilaos News) - ("https://protesilaos.com/codelog.xml" Proetesilaos Coding) - ("https://guix.gnu.org/feeds/blog.atom" Guix Blog) - ("https://rss.nytimes.com/services/xml/rss/nyt/World.xml" NYT World) - ("https://rss.nytimes.com/services/xml/rss/nyt/Science.xml" NYT Science) - ("https://rss.nytimes.com/services/xml/rss/nyt/Health.xml" NYT Health) - ("https://drewdevault.com/blog/index.xml" DrewDeVault) - ("http://lifehacker.com/index.xml" LifeHacker)))) + ("https://hackaday.com/blog/feed/" + hackaday linux) + ("https://www.thanosapollo.com/public/feed.xml" + thanos) + ("https://protesilaos.com/news.xml" + protesilaos) + ("https://protesilaos.com/codelog.xml" + proetesilaos) + ("https://guix.gnu.org/feeds/blog.atom" + gnu guix) + ("https://rss.nytimes.com/services/xml/rss/nyt/Science.xml" + NYT science) + ("https://rss.nytimes.com/services/xml/rss/nyt/Health.xml" + NYT med) + ("https://drewdevault.com/blog/index.xml" + sourcehut drewdevault) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg" + youtube dt) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA" + youtube mental) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ" + youtube daviwil) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA" + youtube luke) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UCrc2iv2-G1FZ3VscM3zu2jg" + youtube zoogirl) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g" + youtube prot) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UCq6VFHwMzcMXbuKyG7SQYIg" + youtube moist)))) + + +(defun elfeed-v-mpv (url) + "Watch a video from URL in MPV" + (async-shell-command (format "mpv %s" url))) + +(defun elfeed-view-mpv (&optional use-generic-p) + "Youtube-feed link" + (interactive "P") + (let ((entries (elfeed-search-selected))) + (cl-loop for entry in entries + do (elfeed-untag entry 'unread) + when (elfeed-entry-link entry) + do (elfeed-v-mpv it)) + (mapc #'elfeed-search-update-entry entries) + (unless (use-region-p) (forward-line)))) + +(define-key elfeed-search-mode-map (kbd "v") 'elfeed-view-mpv) + (setq elfeed-goodies/entry-pane-size 0.65) (elfeed-goodies/setup) -- cgit v1.2.3