From e8d4afa471bc4812eef63ae9b8f7c156638fd8f8 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 3 Sep 2021 16:19:27 -0500 Subject: Further improve IRC experience - Add SLAP command - Kill buffer on PART - Turns out, circe formatting variables can be functions! Thank the gods :D --- init.el | 64 ++++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 28 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 275d830..1dac20c 100644 --- a/init.el +++ b/init.el @@ -1232,6 +1232,7 @@ like a dumbass." (:option acdw-irc/left-margin 12 acdw-irc/post-my-nick "-> " + circe-channel-killed-confirmation nil circe-color-nicks-everywhere t circe-default-nick "acdw" circe-default-part-message "See You, Space Cowpokes . . ." @@ -1264,6 +1265,12 @@ like a dumbass." ((t (:inherit (modus-themes-hl-line)))) :now)) + (:bind "C-c C-p" circe-command-PART) + + (:advise circe-command-PART :after + (defun circe-command-PART@kill-buffer (&rest _) + (kill-buffer))) + (add-hook 'circe-chat-mode-hook (defun circe-chat@setup () (lui-set-prompt @@ -1284,34 +1291,35 @@ like a dumbass." (add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset) - (let ((len (number-to-string (- acdw-irc/left-margin 1 - (+ (length acdw-irc/pre-nick) - (length acdw-irc/post-nick))))) - (my-len (number-to-string (- acdw-irc/left-margin 1 - (+ (length acdw-irc/pre-my-nick) - (length acdw-irc/post-my-nick)))))) - (setq circe-format-say (concat acdw-irc/pre-nick - "{nick:" len "." len "s} " - acdw-irc/post-nick - "{body}") - circe-format-self-say (concat acdw-irc/pre-my-nick - "{nick:" my-len "." my-len "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 circe-format-say + (lambda (&rest plist) + (concat + (acdw-irc/margin-format (plist-get plist :nick) "" " |" t) + " " + (plist-get plist :body))) + + circe-format-self-say + (lambda (&rest plist) + (concat + (acdw-irc/margin-format (plist-get plist :nick) "-" " >" t) + " " + (plist-get plist :body))) + + circe-format-action + (lambda (&rest plist) + (concat + (acdw-irc/margin-format (plist-get plist :nick) "*" " *" t) + " " + (plist-get plist :body))) + + circe-format-self-action + (lambda (&rest plist) + (concat + (acdw-irc/margin-format (plist-get plist :nick) "-*" " *" t) + " " + (plist-get plist :body))) + + lui-fill-type (repeat-string acdw-irc/left-margin " ")) (:option lui-fill-column fill-column lui-time-stamp-position 'right-margin -- cgit 1.4.1-21-gabe81