From 0aab1430c86c6f1e30d92f30cec6b5e92f6be1a3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 24 Apr 2022 15:02:12 -0500 Subject: Configure jabber --- init.el | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index b41b6a0..ace54a4 100644 --- a/init.el +++ b/init.el @@ -1742,17 +1742,16 @@ See also `crux-reopen-as-root-mode'." (define-key isearch-mb-minibuffer-map (kbd key) command))))))) (isearch-mb-mode +1)) -(setup (:straight (jabber :repo "https://tildegit.org/wgreenhouse/emacs-jabber" +(setup (:straight (jabber :repo "https://codeberg.org/emacs-jabber/emacs-jabber" :host nil :files ("*.el" "*.texi" ("jabber-fallback-lib" "jabber-fallback-lib/hexrgb.el" "jabber-fallback-lib/srv.el" "jabber-fallback-lib/fsm.el") - "jabber-pkg.el") - :fork (:repo "https://tildegit.org/acdw/emacs-jabber" - :host nil))) + "jabber-pkg.el"))) (:also-load +jabber) + (defvar +jabber-ws-prefix 8 "Width to pad left side of chats.") (:option jabber-account-list '(("acdw@hmm.st")) jabber-groupchat-buffer-format "X:%n" jabber-chat-buffer-format "X:%n" @@ -1760,13 +1759,37 @@ See also `crux-reopen-as-root-mode'." jabber-activity-show-p #'ignore jabber-muc-decorate-presence-patterns '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$") - ("." . jabber-muc-presence-dim))) + ("." . jabber-muc-presence-dim)) + jabber-muc-colorize-foreign t + jabber-chat-foreign-prompt-format (concat "[%t] %n:\n" + (make-string +jabber-ws-prefix + ?\ )) + jabber-chat-local-prompt-format (concat "[%t] %n:\n" + (make-string +jabber-ws-prefix + ?\ )) + jabber-groupchat-prompt-format (concat "[%t] %n:\n" + (make-string +jabber-ws-prefix + ?\ )) + jabber-auto-reconnect t) + (add-hook 'modus-themes-after-load-theme-hook + (defun jabber-chat@after-modus-themes-load () + (modus-themes-with-colors + (:face 'jabber-chat-prompt-foreign `((t (:foreground ,red))) + 'jabber-chat-prompt-local `((t (:foreground ,blue))) + 'jabber-chat-prompt-system `((t (:foreground ,green))))))) (dolist (mode '(jabber-chat-mode jabber-browse-mode jabber-roster-mode jabber-console-mode)) (add-hook (intern (format "%s-hook" mode)) #'visual-fill-column-mode)) - (add-hook 'jabber-activity-mode-hook 'tracking-mode) + (add-hook 'jabber-activity-mode-hook #'tracking-mode) + (:with-mode jabber-chat-mode + (:local-set +modeline-position-function (lambda () + (cond + ((string-match-p "hmm@" (buffer-name)) + "🤔 "))) + wrap-prefix (make-string +jabber-ws-prefix ?\ ) + )) (:+leader "C-j" jabber-global-keymap) (advice-add 'jabber-activity-add :after #'+jabber-tracking-add) (advice-add 'jabber-activity-add-muc :after #'+jabber-tracking-add-muc)) -- cgit 1.4.1-21-gabe81