Files
dot-emacs/.emacs.d/erc.org
2025-08-02 14:03:38 -07:00

1.3 KiB

ERC

ERC is a built-in package that adds IRC chatting functionality to emacs.

;; Shotcuts for general
(jm/leader-keys 
  "cc" '(erc-tls :which-key "Connect to IRC over TLS")
  "cb" '(erc-switch-to-buffer :which-key "Switch IRC buffers"))

(use-package erc
  :ensure nil
  :defer t
  :custom
  (erc-nick "random936")
  (erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
                             "353" "324" "329" "332" "333" "353" "477"))
  (erc-autojoin-channels-alist '((".*\.libera\.chat" "#emacs" "#nixos" "#systemcrafters")))
  (erc-fill-column 120)
  (erc-fill-function 'erc-fill-static)
  (erc-fill-static-center 20)
  (erc-kill-buffer-on-part t)
  (erc-kill-queries-on-quit t)
  (erc-kill-server-buffer-on-quit t)
  :config
  (add-to-list 'erc-modules 'notifications))

ERC Extensions

To highlight each nickname with a different color, I can use the erc-hl-nicks package. I can also use the erc-image package to render images sent by other users over IRC.

(use-package erc-hl-nicks
  :after erc
  :config (add-to-list 'erc-modules 'hl-nicks))

(use-package erc-image
  :after erc
  :config
  (setq erc-image-inline-rescale 300)
  (add-to-list 'erc-modules 'image))