From b48c476efae4d055fae7442c9bede603eee3cb9c Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 27 Mar 2024 16:23:53 -0400 Subject: [PATCH] erc fixes --- init.el | 98 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 32 deletions(-) diff --git a/init.el b/init.el index 22068c8..1b3b6d1 100644 --- a/init.el +++ b/init.el @@ -1756,38 +1756,72 @@ or else the number of characters matched by `outline-regexp'." "324" "329" "332" "333" "353") ;; seems good, i don't care about the server buffer generally erc-track-exclude-server-buffer t - ;; dont highlight channels just cuz of new messages - erc-track-priority-faces-only 'all - ;; so that we don't show channels where i havent been mmentioned - erc-track-faces-priority-list '(erc-current-nick-face - erc-keyword-face - erc-pal-face - erc-nick-msg-face - erc-direct-msg-face - erc-fool-face) - - - ) ; end setq - - :config - (add-hook 'erc-server-PRIVMSG-functions - 'erc-my-privmsg-sound) - (add-hook 'erc-text-matched-hook 'erc-sound-if-not-server) - (erc-track-mode 1) - (defun erc-track--switch-buffer (fun arg) - (if (not erc-track-mode) - (message (concat "Enable the ERC track module if you want to use the" - " tracking minor mode")) - (cond (erc-modified-channels-alist - ;; if we're not in erc-mode, set this buffer to return to - (if-let ((buf (erc-track-get-active-buffer arg)) - ((buffer-live-p buf))) - (funcall fun buf) - (erc-modified-channels-update) - (erc-track--switch-buffer fun arg))) - ;; if no active channels, switch back to what we were doing before - (t (switch-to-buffer "#fsfsys"))))) - ) + ;; dont highlight channels just cuz of new messages, except for pms or some new channel I haven't listed in my config. + + erc-track-shorten-cutoff 40 + ;; sed -rn 's/.*(#[^>]*).*/"\1"/p' /p/c/machine_specific/li/filesystem/var/lib/znc/configs/znc.conf + erc-track-priority-faces-only (list + "#conservancy" + "#fosdem" + "#fsf" + "#fsf-licensing" + "#fsfe" + "#fsfsys" + "#gnu" + "#librecmc" + "#libreplanet-tech-support" + "#libreplanet" + "#mnt-reform" + "#nouveau" + "#pump.io" + "#savannah" + "#seagl" + "#social" + "#spamassassin" + "#talos-workstation" + "#trisquel" + "#trisquel-dev" + "#overseers" + "#gdb" + "#gcc" + "#glibc" + "#binutils" + "#gnu-linux-libre" + "#parabola" + "#guix" + "#gnu-ops" + "#gcc" + ) + ;; so that we don't show channels where i havent been mmentioned + erc-track-faces-priority-list '(erc-current-nick-face + erc-keyword-face + erc-pal-face + erc-nick-msg-face + erc-direct-msg-face + erc-fool-face) + + + ) ; end setq + +:config +(add-hook 'erc-server-PRIVMSG-functions + 'erc-my-privmsg-sound) +(add-hook 'erc-text-matched-hook 'erc-sound-if-not-server) +(erc-track-mode 1) +(defun erc-track--switch-buffer (fun arg) + (if (not erc-track-mode) + (message (concat "Enable the ERC track module if you want to use the" + " tracking minor mode")) + (cond (erc-modified-channels-alist + ;; if we're not in erc-mode, set this buffer to return to + (if-let ((buf (erc-track-get-active-buffer arg)) + ((buffer-live-p buf))) + (funcall fun buf) + (erc-modified-channels-update) + (erc-track--switch-buffer fun arg))) + ;; if no active channels, switch back to what we were doing before + (t (switch-to-buffer "#fsfsys"))))) +) ;;; named commands (defun rm-file-and-buffer () "Removes file connected to current buffer and kills buffer." -- 2.30.2