Advertisement
gfteix

Untitled

Dec 28th, 2022
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 3.03 KB | None | 0 0
  1. ;;rss: elfeed
  2. (require 'elfeed)
  3.  
  4. (defun elfeed-v-mpv (url)
  5.   "Watch a video from URL in MPV"
  6.   (call-process-shell-command (format "mpv --force-window '%s'" url) nil 0))
  7.  ; (async-shell-command (format "mpv --geometry=50%x100%-1+1 --ytdl-format=best %s" url)))
  8.  ;
  9. (defun elfeed-search-open-enclosure  (&optional use-generic-p)
  10.   "Youtube-feed link"
  11.   (interactive "P")
  12.   (let ((entries (elfeed-search-selected)))
  13.     (cl-loop for entry in entries
  14.      do (elfeed-untag entry 'unread)
  15.      when (elfeed-entry-link entry)
  16.      do (elfeed-v-mpv it))
  17.    (mapc #'elfeed-search-update-entry entries)
  18.    (unless (use-region-p) (forward-line)
  19.    (message "Opening..."))))
  20.  
  21. ;; C-c m or P for podcasts (after RET)
  22. (define-key elfeed-search-mode-map (kbd "C-c m") 'elfeed-search-open-enclosure)
  23.  
  24. (require 'elfeed-goodies)
  25. (elfeed-goodies/setup)
  26. (setq elfeed-goodies/entry-pane-size 0.5)
  27.  
  28.  
  29. (setq elfeed-feeds (quote(
  30.               ("https://notrelated.xyz/rss" podcast lukesmith)
  31.               ("https://lexfridman.com/feed/podcast/" podcast lexfridman)
  32.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg" youtube distrotube tech)
  33.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA" youtube lukesmith)
  34.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCJIfeSCssxSC_Dhc5s7woww" youtube lexfridman)
  35.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCjVwBKqRh8ckPWhfD5UDKcg" youtube lindie language)
  36.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCqYPhGiB9tkShZorfgcL2lA" youtube whatihavelearned)
  37.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCLbiwlm3poGNh5XSVlXBkGA" youtube polymathy)
  38.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw" youtube 3blue1brown math)
  39.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCimiUgDLbi6P17BdaCZpVbg" youtube exurb1a)
  40.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCVk8weS4S2kJfja72fTxh5A" youtube freecodecamp tech) ;; FreeCodeCamp Talks
  41.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCwgKmJM4ZJQRJ-U5NjvR2dg" youtube georgehotz tech)
  42.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g" youtube protesilaos)
  43.                           ("https://www.youtube.com/feeds/videos.xml?channel_id=UCG-KntY7aVnIGXYEBQvmBAQ" youtube thomasfrank)
  44.               ("http://feeds.dzone.com/webdev" blog dzone tech)
  45.                           ("https://lukesmith.xyz/rss.xml" blog lukesmith)
  46.               ("https://www.reddit.com/r/linux.rss" reddit tech)
  47.                           ("https://www.reddit.com/r/emacs.rss" reddit tech)
  48.                           ("https://www.reddit.com/r/languagelearning.rss" reddit language)
  49.                           ("https://www.reddit.com/r/latin.rss" reddit language)
  50.                           )))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement