summaryrefslogtreecommitdiff
path: root/.emacs.d/modules/thanos-elfeed.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-09-03 17:05:49 +0300
committerThanos Apollo <[email protected]>2023-09-03 17:06:54 +0300
commit8efa6f3f1db166d30a4eb38780f6c47855c51439 (patch)
tree873e0c0aeb443c10153a44e14a3d89c938e68e4d /.emacs.d/modules/thanos-elfeed.el
parentf7c3db0c688b9b98762464cc9e4cc7c87a9dbe96 (diff)
emacs: Modularize
Diffstat (limited to '.emacs.d/modules/thanos-elfeed.el')
-rw-r--r--.emacs.d/modules/thanos-elfeed.el126
1 files changed, 126 insertions, 0 deletions
diff --git a/.emacs.d/modules/thanos-elfeed.el b/.emacs.d/modules/thanos-elfeed.el
new file mode 100644
index 0000000..181e8f4
--- /dev/null
+++ b/.emacs.d/modules/thanos-elfeed.el
@@ -0,0 +1,126 @@
+;;; thanos-elfeed.el --- elfeed configuration -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023 Thanos Apollo
+
+;; Author: Thanos Apollo <[email protected]>
+;; Keywords: extensions
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(require 'elfeed)
+(require 'elfeed-goodies)
+(setf elfeed-feeds
+ '(("https://hackaday.com/blog/feed/"
+ hackaday linux)
+ ("https://protesilaos.com/news.xml"
+ protesilaos)
+ ("https://protesilaos.com/codelog.xml"
+ proetesilaos)
+ ("https://guix.gnu.org/feeds/blog.atom"
+ gnu guix)
+ ("https://thanosapollo.com/posts/index.xml"
+ thanos)
+ ("http://nullprogram.com/feed/"
+ emacs linux)
+ ("https://drewdevault.com/blog/index.xml"
+ sourcehut drewdevault)
+ ("https://spacepub.space/feeds/videos.xml?videoChannelId=2"
+ drewdevault video)
+ ("https://odysee.com/$/rss/@DistroTube:2"
+ video dt)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA"
+ video mental)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ"
+ video daviwil)
+ ("https://videos.lukesmith.xyz/feeds/videos.atom?sort=-publishedAt&isLocal=true"
+ video luke)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCrc2iv2-G1FZ3VscM3zu2jg"
+ video zoogirl)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g"
+ video prot)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCq6VFHwMzcMXbuKyG7SQYIg"
+ video moist)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UC05XpvbHZUQOfA6xk4dlmcw"
+ video djware)
+ ("https://archlinux.org/feeds/news/"
+ ArchLinux Latest)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA"
+ fireship video)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCl-J-ovSJhA3or73Q2uVpow"
+ medicosperf video)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCSuHzQ3GrHSzoBbwrIq3LLA"
+ naomi video)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCqYPhGiB9tkShZorfgcL2lA"
+ WhatIveLearned video)
+ ("http://wikileaks.org/feed"
+ wikileaks)
+ ("https://hackernoon.com/feed"
+ hackernoon)
+ ("https://sachachua.com/blog/feed/"
+ sacha emacs)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCtMVHI3AJD4Qk4hcbZnI9ZQ"
+ video OrdinaeryGamers)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCl2mFZoRqjw_ELax4Yisf6w"
+ video Louis)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UC1yNl2E66ZzKApQdRuTQ4tw "
+ video sabine)
+ ("https://bits.debian.org/feeds/feed.rss"
+ debian linux)
+ ("https://torrentfreak.com/feed"
+ torrentfreak)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCM6SlP9fiwPIjhkWmbg8Ojg"
+ video liberated-programmer)
+ ("https://odysee.com/$/rss/@seytonic:c"
+ video seytonic)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UC1yNl2E66ZzKApQdRuTQ4tw"
+ video sabine)
+ ("https://wp.medscape.com/cx/rssfeeds/2700.xml"
+ med medscape)
+ ("https://nyxt.atlas.engineer/feed"
+ nyxt)))
+
+(defun elfeed-v-mpv (url)
+ "Watch a video from URL in MPV"
+ (start-process-shell-command "elfeed-video" nil (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)
+(define-key elfeed-search-mode-map (kbd "U") 'elfeed-update)
+(define-key thanos/applications-map (kbd "f") 'elfeed)
+
+(setf elfeed-goodies/entry-pane-size 0.55)
+(elfeed-goodies/setup)
+
+(setf eshell-visual-commands '())
+(eat-eshell-mode 1)
+
+
+(provide 'thanos-elfeed)
+;;; thanos-elfeed.el ends here