From 466fa4e93ee1a1525d217de15ed7f7060145332e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 22 May 2021 16:41:10 -0500 Subject: Configure ERC I'm not sure how much I'm going to use it, but it's done now. --- init.el | 22 +++++++++++++++++++++- lisp/acdw-modeline.el | 4 ++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index f215f9d..c2fd0b4 100644 --- a/init.el +++ b/init.el @@ -258,6 +258,25 @@ (_ (set-selection-coding-system 'utf-8) (set-clipboard-coding-system 'utf-8)))) +;; I don't really use ERC that much, but if/when I start ... I'll be ready. +(setup erc + (:option erc-track-position-in-mode-line 'before-modes + erc-hide-list '("329" "332" "333" "353" "MODE" + "TOPIC" "JOIN" "PART" "QUIT" "NICK")) + ;; https://www.emacswiki.org/emacs/ErcModeline#h5o-1 + (defface erc-header-line-disconnected + '((t (:foreground "black" :background "indianred"))) + "Face to use when ERC has been disconnected.") + + (defun erc-update-header-line-show-disconnected () + "Use a different face in the header-line when disconnected." + (erc-with-server-buffer + (cond ((erc-server-process-alive) 'erc-header-line) + (t 'erc-header-line-disconnected)))) + + (:option erc-header-line-face-method + #'erc-update-header-line-show-disconnected)) + (setup eshell (:option eshell-directory-name (acdw/dir "eshell/" t) eshell-aliases-file (acdw/dir "eshell/aliases" t) @@ -1026,11 +1045,12 @@ if ripgrep is installed, otherwise `consult-grep'." acdw-modeline/vc-branch simple-modeline-segment-position) (simple-modeline-segment-misc-info + acdw-modeline/erc acdw-modeline/word-count - acdw-modeline/winum acdw-modeline/text-scale simple-modeline-segment-process acdw-modeline/god-mode-indicator + acdw-modeline/winum acdw-modeline/minions simple-modeline-segment-major-mode))) diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 4f78816..d5589a9 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -30,6 +30,10 @@ 'font-lock-type-face) 'help-echo (buffer-file-name))) +(defun acdw-modeline/erc () + "ERC indicator for the modeline." + (format-mode-line erc-modified-channels-object)) + (defun acdw-modeline/god-mode-indicator () (when (bound-and-true-p god-local-mode) " God")) -- cgit 1.4.1-21-gabe81