dotfiles

A steaming hot pile of sh...ell scripts and configuration files.
git clone https://kaka.farm/~git/dotfiles
Log | Files | Refs

commit 99027618aa4ac74e738befe3ae29fceeab0fe1da
parent 11f5dedc1b3768d14618cf1556a4920802b671b9
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Mon, 29 Jul 2024 17:51:35 +0300

Update GNU Emacs configuration and functions and definitions.

Diffstat:
Mconfig/emacs/elfeed-feeds.el | 196++++++++++++++++++++++++++++++++++++++++---------------------------------------
Mconfig/emacs/init.el | 48+++++++++++++++++++++++++++++++++++-------------
Mconfig/emacs/kakafarm-utils.el | 18++++++++++++++++++
3 files changed, 152 insertions(+), 110 deletions(-)

diff --git a/config/emacs/elfeed-feeds.el b/config/emacs/elfeed-feeds.el @@ -1,99 +1,101 @@ (require 'cl-lib) -(setq kakafarm/elfeed-feeds - '( - ("https://acdw.casa/feed.xml" acdw activitypub blog craftering) - ("https://analognowhere.com/feed/rss.xml" comics unixsurrealism) - ("https://api.substack.com/feed/podcast/462466.rss" blog foss freesoftware linux lunduke news opensource unix) - ("https://beej.us/blog/rss.xml" blog programming) - ("https://blog.benoitj.ca/posts/index.xml" blog craftering) - ("https://blog.cleancoder.com/atom.xml" blog programming unclebob) - ("https://blog.codeberg.org/feeds/all.atom.xml" codeberg) - ("https://blog.vaxry.net/feed" blog linux) - ("https://botsin.space/@mechilim/with_replies.rss" activitypub covid israel) - ("https://c.im/@NWengrov.rss" activitypub blog novartza) - ("https://cdn.jwz.org/blog/feed/" blog jwz) - ("https://chris-hughes.dev/rss" blog craftering) - ("https://christerpher.com/feed.xml" blog craftering) - ("https://chromefetus.thecomicseries.com/rss/" chromefetus comics) - ("https://davidson.weizmann.ac.il/rss.xml" davidson news science weizmann) - ("https://deidetected.com/index.php/comments/feed/" csj withreplies) - ("https://deidetected.com/index.php/feed/" csj) - ("https://drewdevault.com/blog/index.xml" blog drewdevault linux programming) - ("https://dthompson.us/feed.xml" blog dthompson programming scheme) - ("https://erictopol.substack.com/feed" covid erictopol science) - ("https://feeds.transistor.fm/collection-of-jhourneys" jhourney meditation podcast) - ("https://galperel.wordpress.com/feed/" books hebrew israel) - ("https://glenneth.srht.site/feed.xml" blog craftering) - ("https://hyperboleandahalf.blogspot.com/feeds/posts/default" blog comics) - ("https://idlip.github.io/rss.xml" blog craftering) - ("https://internet-israel.com/feed/" internet israel) - ("https://jabbo.webdings.de/blog/atom.xml" blog craftering) - ("https://kaka.farm/haunt/feed.xml" blog craftering self) - ("https://kaka.farm/~brownjenkin/feeds/all.atom.xml" blog self) - ("https://lemmy.sdf.org/feeds/c/unix_surrealism.xml" comics lemmy sdf unixsurrealism) - ("https://lemmy.sdf.org/u/beejjorgensen" beej lemmy sdf) - ("https://libera.chat/atom.xml" blog irc liberachat news) - ("https://luminousnine.com/feed.xml" blog craftering) - ("https://masto.ai/@johnsnowproject/with_replies.rss" activitypub corona covid) - ("https://mastodon.sdf.org/@beejjorgensen.rss" activitypub beej sdf) - ("https://megananda.org/comments/feed/" blog comments meditation) - ("https://megananda.org/feed/" blog meditation) - ("https://merveilles.town/tags/unix_surrealism.rss" comics unixsurrealism) - ("https://michal.sapka.me/bsd/rss.xml" blog bsd michalsapka unix) - ("https://michal.sapka.me/emacs/rss.xml" blog emacs michalsapka unix) - ("https://michal.sapka.me/index.xml" blog bsd emacs linux michalsapka unix) - ("https://mstdn.social/@erictopol.rss" activitypub covid erictopol science) - ("https://mstdn.social/@erictopol/with_replies.rss" activitypub covid erictopol science) - ("https://newdiscourses.com/feed/" csj) - ("https://odysee.com/$/rss/@ArkhamReporter:5" arkhamreporter lovecraft video) - ("https://planet.debian.org/rss20.xml" blog debian linux) - ("https://planet.emacslife.com/atom.xml" emacs emacslife planet) - ("https://planet.scheme.org/atom.xml" lisp planet scheme) - ("https://puri.sm/feed/" linux purism) - ("https://purplg.dev/index.xml" blog craftering) - ("https://rednosehacker.com/feed/" blog emacs guile lisp programming scheme) - ("https://retropikzel.kapsi.fi/feed.xml" blog craftering) - ("https://richarddavis.xyz/en/blog/rss.xml" blog craftering) - ("https://rss.art19.com/ten-percent-happier" meditation podcast) - ("https://samharris.substack.com/feed" blog samharris) - ("https://sfba.social/@danielmingram/with_replies.rss" activitypub danielmingram) - ("https://shakuf.co.il/feed" israel news shakuf) - ("https://shom.dev/index.xml" blog craftering linux) - ("https://spritely.institute/feed.xml" linux lisp scheme) - ("https://sr.ht/~abcdw/rde-monthly/feed.rss" guix lisp newsletter scheme) - ("https://status.mangadex.org/history.atom" comics) - ("https://systemcrafters.net/rss/news.xml" blog craftering emacs guile guix linux lisp news scheme) - ("https://tdback.net/index.xml" blog craftering) - ("https://thanosapollo.org/index.xml" blog craftering) - ("https://tooot.im/@NWengrov.rss" activitypub blog novartza) - ("https://tooot.im/@admin.rss" activitypub admin) - ("https://torrentfreak.com/feed/" filesharing internet news pirating torrents) - ("https://trevarj.github.io/rss.xml" blog craftering) - ("https://triapul.cz/feed/cesky.xml" blog cesky computing czech unix unixsurrealism) - ("https://triapul.cz/feed/english.xml" blog computing unix unixsurrealism) - ("https://triapul.cz/feed/gopher.xml" blog computing gopher unix unixsurrealism) - ("https://tusharhero.codeberg.page/rss.xml" blog craftering) - ("https://tylerdback.com/index.xml" blog craftering) - ("https://vimeo.com/user13532867/videos/rss" danielmingram meditation) - ("https://whatsup.org.il/backend-forums.php?utf8=1" israel linux whatsup) - ("https://whatsup.org.il/backend.php?utf8=1" israel linux whatsup) - ("https://www.accursedfarms.com/rss/3-accursed-farms.xml/" accursedfarms blog) - ("https://www.blipanika.co.il/?feed=rss2" israel scifi) - ("https://www.debian.org/News/news" debian linux news) - ("https://www.goominet.com/unspeakable-vault/?type=103" comics) - ("https://www.ha-makom.co.il/feed/" hamakom israel news) - ("https://www.hayadan.org.il/feed" hayadan news science) - ("https://www.jhourney.io/blog?format=rss" blog jhana jhourney meditation) - ("https://www.linux.com/feed/" linux) - ("https://www.livejournal.com/allpics.bml?user=oglafcomics" comics) - ("https://www.midaat.org.il/feed/" conspiracy medicine midaat science) - ("https://www.more-magic.net/feed.atom" blog computing lisp programming scheme unix) - ("https://www.rahuljuliato.com/rss.xml" blog craftering) - ("https://www.realityslaststand.com/feed" csj popsci) - ("https://www.rifters.com/crawl/?feed=rss2" blog peterwatts scifi) - ("https://www.snamellit.com/rss.xml" blog craftering) - ("https://www.the7eye.org.il/feed" israel news the7eye) - ("https://www.wheresyoured.at/rss/" blog news tech) - ("https://www.youtube.com/feeds/videos.xml?channel_id=UCzREuchzOqiawpEpvEM0Tyg" atheism islam youtube) - )) +(customize-set-value 'elfeed-feeds + '( + ("https://acdw.casa/feed.xml" acdw activitypub blog craftering) + ("https://analognowhere.com/feed/rss.xml" comics unixsurrealism) + ("https://api.substack.com/feed/podcast/462466.rss" blog foss freesoftware linux lunduke news opensource unix) + ("https://beej.us/blog/rss.xml" blog programming) + ("https://blog.benoitj.ca/posts/index.xml" blog craftering) + ("https://blog.cleancoder.com/atom.xml" blog programming unclebob) + ("https://blog.codeberg.org/feeds/all.atom.xml" codeberg) + ("https://blog.vaxry.net/feed" blog linux) + ("https://botsin.space/@mechilim/with_replies.rss" activitypub covid israel) + ("https://c.im/@NWengrov.rss" activitypub blog novartza) + ("https://cdn.jwz.org/blog/feed/" blog jwz) + ("https://chris-hughes.dev/rss" blog craftering) + ("https://christerpher.com/feed.xml" blog craftering) + ("https://chromefetus.thecomicseries.com/rss/" chromefetus comics) + ("https://davidson.weizmann.ac.il/rss.xml" davidson news science weizmann) + ("https://deidetected.com/index.php/comments/feed/" csj withreplies) + ("https://deidetected.com/index.php/feed/" csj) + ("https://drewdevault.com/blog/index.xml" blog drewdevault linux programming) + ("https://dthompson.us/feed.xml" blog dthompson programming scheme) + ("https://erictopol.substack.com/feed" covid erictopol science) + ("https://feeds.transistor.fm/collection-of-jhourneys" jhourney meditation podcast) + ("https://galperel.wordpress.com/feed/" books hebrew israel) + ("https://glenneth.srht.site/feed.xml" blog craftering) + ("https://hyperboleandahalf.blogspot.com/feeds/posts/default" blog comics) + ("https://idlip.github.io/rss.xml" blog craftering) + ("https://internet-israel.com/feed/" internet israel) + ("https://jabbo.webdings.de/blog/atom.xml" blog craftering) + ("https://kaka.farm/haunt/feed.xml" blog craftering self) + ("https://kaka.farm/~brownjenkin/feeds/all.atom.xml" blog self) + ("https://lemmy.sdf.org/feeds/c/unix_surrealism.xml" comics lemmy sdf unixsurrealism) + ("https://lemmy.sdf.org/u/beejjorgensen" beej lemmy sdf) + ("https://libera.chat/atom.xml" blog irc liberachat news) + ("https://luminousnine.com/feed.xml" blog craftering) + ("https://masto.ai/@johnsnowproject/with_replies.rss" activitypub corona covid) + ("https://mastodon.sdf.org/@beejjorgensen.rss" activitypub beej sdf) + ("https://me.literatelisp.eu/feed.xml" lisp literatelisp programming scheme) + ("https://megananda.org/comments/feed/" blog comments meditation) + ("https://megananda.org/feed/" blog meditation) + ("https://merveilles.town/tags/unix_surrealism.rss" comics unixsurrealism) + ("https://michal.sapka.me/bsd/rss.xml" blog bsd michalsapka unix) + ("https://michal.sapka.me/emacs/rss.xml" blog emacs michalsapka unix) + ("https://michal.sapka.me/index.xml" blog bsd emacs linux michalsapka unix) + ("https://mstdn.social/@erictopol.rss" activitypub covid erictopol science) + ("https://mstdn.social/@erictopol/with_replies.rss" activitypub covid erictopol science) + ("https://newdiscourses.com/feed/" csj) + ("https://odysee.com/$/rss/@ArkhamReporter:5" arkhamreporter lovecraft video) + ("https://planet.debian.org/rss20.xml" blog debian linux) + ("https://planet.emacslife.com/atom.xml" emacs emacslife planet) + ("https://planet.scheme.org/atom.xml" lisp planet scheme) + ("https://puri.sm/feed/" linux purism) + ("https://purplg.dev/index.xml" blog craftering) + ("https://rednosehacker.com/feed/" blog emacs guile lisp programming scheme) + ("https://retropikzel.kapsi.fi/feed.xml" blog craftering) + ("https://richarddavis.xyz/en/blog/rss.xml" blog craftering) + ("https://rotter.net/rss/rotternews.xml" hebrew israel news rotter sitraachra) + ("https://rss.art19.com/ten-percent-happier" meditation podcast) + ("https://samharris.substack.com/feed" blog samharris) + ("https://sfba.social/@danielmingram/with_replies.rss" activitypub danielmingram) + ("https://shakuf.co.il/feed" israel news shakuf) + ("https://shom.dev/index.xml" blog craftering linux) + ("https://spritely.institute/feed.xml" linux lisp scheme) + ("https://sr.ht/~abcdw/rde-monthly/feed.rss" guix lisp newsletter scheme) + ("https://status.mangadex.org/history.atom" comics) + ("https://systemcrafters.net/rss/news.xml" blog craftering emacs guile guix linux lisp news scheme) + ("https://tdback.net/index.xml" blog craftering) + ("https://thanosapollo.org/index.xml" blog craftering) + ("https://tooot.im/@NWengrov.rss" activitypub blog novartza) + ("https://tooot.im/@admin.rss" activitypub admin) + ("https://torrentfreak.com/feed/" filesharing internet news pirating torrents) + ("https://trevarj.github.io/rss.xml" blog craftering) + ("https://triapul.cz/feed/cesky.xml" blog cesky computing czech unix unixsurrealism) + ("https://triapul.cz/feed/english.xml" blog computing unix unixsurrealism) + ("https://triapul.cz/feed/gopher.xml" blog computing gopher unix unixsurrealism) + ("https://tusharhero.codeberg.page/rss.xml" blog craftering) + ("https://tylerdback.com/index.xml" blog craftering) + ("https://vimeo.com/user13532867/videos/rss" danielmingram meditation) + ("https://whatsup.org.il/backend-forums.php?utf8=1" israel linux whatsup) + ("https://whatsup.org.il/backend.php?utf8=1" israel linux whatsup) + ("https://www.accursedfarms.com/rss/3-accursed-farms.xml/" accursedfarms blog) + ("https://www.blipanika.co.il/?feed=rss2" israel scifi) + ("https://www.debian.org/News/news" debian linux news) + ("https://www.goominet.com/unspeakable-vault/?type=103" comics) + ("https://www.ha-makom.co.il/feed/" hamakom israel news) + ("https://www.hayadan.org.il/feed" hayadan news science) + ("https://www.jhourney.io/blog?format=rss" blog jhana jhourney meditation) + ("https://www.linux.com/feed/" linux) + ("https://www.livejournal.com/allpics.bml?user=oglafcomics" comics) + ("https://www.midaat.org.il/feed/" conspiracy medicine midaat science) + ("https://www.more-magic.net/feed.atom" blog computing lisp programming scheme unix) + ("https://www.rahuljuliato.com/rss.xml" blog craftering) + ("https://www.realityslaststand.com/feed" csj popsci) + ("https://www.rifters.com/crawl/?feed=rss2" blog peterwatts scifi) + ("https://www.snamellit.com/rss.xml" blog craftering) + ("https://www.the7eye.org.il/feed" israel news the7eye) + ("https://www.wheresyoured.at/rss/" blog news tech) + ("https://www.youtube.com/feeds/videos.xml?channel_id=UCzREuchzOqiawpEpvEM0Tyg" atheism islam youtube) + )) diff --git a/config/emacs/init.el b/config/emacs/init.el @@ -17,12 +17,6 @@ (setq package-archives '()) (require 'use-package) -(dolist (x '("C-c m m" - "C-c m <RET>" - "C-c <RET> m" - "C-c <RET> <RET>")) - (keymap-global-set x 'multi-vterm)) - '(use-package company :defer t :init @@ -48,12 +42,17 @@ (use-package elfeed :defer t - :init + :config + ;; XXX: Not sure if I want it to be a `kakafarm/elfeed-feeds' + ;; variable that is then set to `elfeed-feeds' in the `:custom' + ;; section, or loaded inside the `elfeed-feeds.el' file using the + ;; `customize-set-value' function. (load (locate-user-emacs-file "elfeed-feeds.el")) :custom (elfeed-curl-max-connections 10) (elfeed-search-filter "@2-months +unread") - (elfeed-feeds kakafarm/elfeed-feeds)) + ;;(elfeed-feeds kakafarm/elfeed-feeds) + ) '(use-package elfeed-goodies :config @@ -61,13 +60,30 @@ (use-package emacs :ensure nil - :defer :bind - ;;((";" . #'kakafarm/easy-underscore)) ( - ("C-c w" . kakafarm/multi-vterm-weechat) + :map global-map ("C-c p" . kakafarm/percent-read) - ("M-x" . helm-M-x) + + ;; (";" . #'kakafarm/easy-underscore) + ) + ) + +(use-package multi-vterm + :defer t + :init + (bind-key "C-c C-w" 'kakafarm/multi-vterm-weechat) + (bind-key "C-c w" 'kakafarm/multi-vterm-weechat) + :bind + ( + :map global-map + ("C-c <RET> <RET>" . multi-vterm) + ("C-c m m" . multi-vterm) + ) + :commands + ( + multi-vterm + multi-vterm-buffer-exist-p ) ) @@ -77,7 +93,13 @@ (set-fontset-font t 'hebrew "Noto Sans Hebrew")) (use-package helm - :defer t) + :defer t + :bind + ( + :map global-map + ("M-x" . helm-M-x) + ) + ) (use-package helpful :defer t diff --git a/config/emacs/kakafarm-utils.el b/config/emacs/kakafarm-utils.el @@ -209,12 +209,28 @@ from https://www.youtube.com/watch?v=6R-73hsL5wk" (defun kakafarm/percent-read () "Display percent read by current cursor location vs. total characters in file." + (interactive) + (message "%.2f%%" (* 100 (/ (float (- (point) 1)) (+ 1 (buffer-size)))))) +(defun kakafarm/percent-read-point-min-max () + "Display percent read by current cursor location vs. place within (point-min) and (point-max)." + + (interactive) + + (let* ((our-location (point)) + (our-location-0-indexed (- our-location 1))) + (message "%.2f%%" + (* 100 + (/ (float (- our-location-0-indexed + (point-min))) + (- (point-max) + (point-min))))))) + (defun kakafarm/recenter-top-bottom (original-function &rest arguments) "Move view such that point is 4 lines from the top of the frame when function is `recenter-top-bottom'." @@ -244,6 +260,8 @@ who-knows-where-and-who." (interactive) + (require 'multi-vterm) + (let* ((vterm-shell (expand-file-name "~/bin/w")) (weechat-buffer-name "weechat") (maybe-weechat-buffer (get-buffer "weechat")))