From 782cc6e31b08d73dfe4b0770f0cf6a20fc9d9859 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 28 Aug 2021 23:08:17 -0500 Subject: Change to circe --- init.el | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index e174823..5ab1559 100644 --- a/init.el +++ b/init.el @@ -323,6 +323,7 @@ (:option erc-auto-discard-away t + erc-auto-set-away t erc-autoaway-idle-seconds 600 erc-autoaway-message "BRB (autoaway: %i seconds)" erc-button-url-regexp browse-url-button-regexp @@ -333,7 +334,7 @@ erc-fill-static-center 14 erc-format-nick-function #'erc-format-truncate-@nick erc-header-line-face-method #'erc/update-header-line-show-disconnected - erc-hide-list '("NICK" "MODE" "JOIN" "PART" "QUIT") + erc-hide-list '("NICK" "MODE" "JOIN" "PART" "QUIT" "AWAY") erc-interpret-controls-p t erc-interpret-mirc-color t erc-join-buffer 'bury @@ -353,7 +354,9 @@ erc-server-coding-system '(utf-8 . utf-8) erc-timestamp-intangible t erc-track-exclude-types (append erc-hide-list - '("AWAY" + '("AWAY" ; for some reason this triggers + ; track anyway... so it's in + ; `erc-hide-list' "353" "324" "329" "332" "333" "477")) erc-track-exclude-server-buffer t erc-track-position-in-mode-line 'before-modes @@ -1109,6 +1112,74 @@ like a dumbass." (setup (:straight (beginend)) (beginend-global-mode +1)) +(setup (:straight circe) + (require 'circe) + (require 'acdw-irc) + + (setq acdw-irc/post-my-nick "-> ") + + (setq circe-default-part-message "See You, Space Cowpokes . . ." + circe-highlight-nick-type 'all + ;; circe-network-options in private.el + circe-reduce-lurker-spam t + circe-server-auto-join-default-type :after-auth) + + (add-hook 'circe-chat-mode-hook + (defun circe-chat@setup () + (lui-set-prompt + (concat (propertize (acdw-irc/margin-format (buffer-name) + "" + ">") + 'face 'circe-prompt-face + 'read-only t 'intangible t + 'cursor-intangible t) + " ")) + (enable-circe-color-nicks) + (enable-circe-display-images) + (enable-circe-new-day-notifier))) + + (setq circe-format-say (format "%s%s%d%s%s%s" + acdw-irc/pre-nick + "{nick:" + (- acdw-irc/left-margin 1 + (+ (length acdw-irc/pre-nick) + (length acdw-irc/post-nick))) + "s} " + acdw-irc/post-nick + "{body}") + circe-format-self-say (format "%s%s%d%s%s%s" + acdw-irc/pre-my-nick + "{nick:" + (- acdw-irc/left-margin 1 + (+ (length acdw-irc/pre-my-nick) + (length acdw-irc/post-my-nick))) + "s} " + acdw-irc/post-my-nick + "{body}") + circe-format-action (concat "*" + (repeat-string (- acdw-irc/left-margin 3) + " ") + "* {nick} {body}") + circe-format-self-action (concat "-*" + (repeat-string (- acdw-irc/left-margin 4) + " ") + "* {nick} {body}") + lui-fill-type (concat + (repeat-string (- acdw-irc/left-margin 2) + " ") + " ")) + + (setq lui-time-stamp-position 'right-margin + lui-time-stamp-format "%H:%M") + (add-hook 'lui-mode-hook + (defun lui-mode@setup () + (setq right-margin-width 5 + scroll-margin 0 + fringes-outside-margins t + word-wrap t + wrap-prefix (repeat-string + (1+ acdw-irc/left-margin) " "))))) + (setup (:straight (consult :host github :repo "minad/consult")) @@ -1696,6 +1767,7 @@ successive invocations." acdw-modeline/wc acdw-modeline/text-scale simple-modeline-segment-process + acdw-modeline/track acdw-modeline/god-mode-indicator acdw-modeline/winum acdw-modeline/minions -- cgit 1.4.1-21-gabe81