]> git.armaanb.net Git - config.org.git/commitdiff
Switch to circe for IRC
authorArmaan Bhojwani <me@armaanb.net>
Wed, 19 May 2021 02:00:15 +0000 (22:00 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Wed, 19 May 2021 02:00:15 +0000 (22:00 -0400)
config.org

index 5c3a087d0cb2cc42743b4ac2adc8b6b4dd610f8a..49d1eab68fecba721f0650e59678a3ef6fef89e3 100644 (file)
@@ -445,25 +445,34 @@ Some EWW enhancements.
   (global-set-key (kbd "C-c w") 'eww)
 #+end_src
 ** IRC
-*** Setup ERC
 #+begin_src emacs-lisp
-  (use-package erc
-    :straight (:type built-in)
+  (use-package circe
     :config
-    (erc-notifications-mode 1)
-    (erc-track-enable)
-    (erc-smiley-disable)
-    :custom (erc-prompt-for-password . nil))
+    (enable-lui-track)
+    (enable-circe-color-nicks))
 
-  (use-package erc-hl-nicks
-    :config (erc-hl-nicks-mode 1))
+  (defun fetch-password (&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))))
 
-  (defun acheam-irc ()
-    "Connect to irc"
-    (interactive)
-    (erc-tls :server "irc.armaanb.net" :nick "emacs"))
+  (setq circe-network-options
+        '(("pounce"
+           :host "irc.armaanb.net"
+           :nick "emacs"
+           :use-tls t
+           :port "6697"
+           :pass (lambda (fetch-password
+                          :login "emacs"
+                          :machine "irc.armaanb.net"
+                          :port 6697))))
 
-  (acheam-irc)
+        (circe "pounce")
 #+end_src
 ** Emacs Anywhere
 Use Emacs globally. Use the Emacs daemon and bind a key in your wm to =emacsclient --eval "(emacs-everywhere)"=.