Configure jabber

This commit is contained in:
Case Duckworth 2022-04-24 15:02:12 -05:00
parent 6d62265dd0
commit 0aab1430c8
1 changed files with 29 additions and 6 deletions

35
init.el
View File

@ -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))