From 44314201ba0f1ca82758a20f6d879b066bfaf876 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 25 Aug 2024 00:04:41 +0200 Subject: emacs: configure IRC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- .config/doom/config.el | 30 ++++++++++++++++++++++++++++++ .config/doom/init.el | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) (limited to '.config') diff --git a/.config/doom/config.el b/.config/doom/config.el index f5e25ea..6b28720 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -280,3 +280,33 @@ ;; Only show unread items. (setq elfeed-search-filter "@1-month-ago +unread")) + +;;; IRC + +;; Key binding for starting Circe. +(map! :leader "o i" #'=irc) + +(after! circe + (setq auth-sources '((:source "~/org/authinfo.gpg"))) + + ;; Given a :user and a :machine, returns the password assigned to it on my + ;; personal authinfo.gpg file as defined in the `auth-sources'. + (defun mssola/fetch-password-from-auth (&rest params) + (require 'auth-source) + (let ((match (car (apply 'auth-source-search params)))) + (if match + (let ((secret (plist-get match :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (error "Password not found for %S" params)))) + + (set-irc-server! "irc.libera.chat" + '(:tls t + :port 6697 + :nick "mssola" + :sasl-username "mssola" + :sasl-password + (lambda (server) + (mssola/fetch-password-from-auth :user "mssola" :machine server)) + :channels ("#riscv")))) diff --git a/.config/doom/init.el b/.config/doom/init.el index 7fff5c9..bf9c41d 100644 --- a/.config/doom/init.el +++ b/.config/doom/init.el @@ -167,7 +167,7 @@ ;;calendar ;;emms ;;everywhere ; *leave* Emacs!? You must be joking - ;;irc ; how neckbeards socialize + irc ; how neckbeards socialize (rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought -- cgit v1.2.3