diff options
author | Thanos Apollo <[email protected]> | 2023-02-28 20:11:29 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-02-28 20:11:29 +0200 |
commit | 7582c959ab3205a1bcdad70fd53ba653ab6dbd8b (patch) | |
tree | 49128a35b047dd1fab83709052e4addf13302e26 /.emacs.d | |
parent | 85ffa32f6f2a1abfd206678deadf192a75ae41bb (diff) |
emacs: Update elfeed, add elfeed-mpv functions and youtube feeds
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 59 |
1 files changed, 49 insertions, 10 deletions
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) |