summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/init.el59
-rw-r--r--emacs.org59
2 files changed, 98 insertions, 20 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)
diff --git a/emacs.org b/emacs.org
index 962ea39..d7d2909 100644
--- a/emacs.org
+++ b/emacs.org
@@ -1015,16 +1015,55 @@ Hook with ~dired-mode~
(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)