Customize jabber

This commit is contained in:
Case Duckworth 2022-01-25 16:55:44 -06:00
parent 3c30daf8a5
commit 6b355568b0
2 changed files with 25 additions and 9 deletions

12
init.el
View File

@ -1318,11 +1318,21 @@ See also `crux-reopen-as-root-mode'."
"jabber-pkg.el")
:fork (:repo "https://tildegit.org/acdw/emacs-jabber"
:host nil)))
(:also-load +jabber)
(:option jabber-account-list '(("acdw@hmm.st"))
jabber-groupchat-buffer-format "%n"
jabber-chat-buffer-format "%n"
jabber-muc-private-buffer-format "%n (%g)"
jabber-activity-show-p #'ignore)
(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 (intern (format "%s-hook" mode)) #'visual-fill-column-mode))
(add-hook 'jabber-activity-mode-hook 'tracking-mode)
(:+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))
(setup (:straight-when keychain-environment
(executable-find "keychain"))

View File

@ -57,16 +57,22 @@ This function makes a lambda, so you can throw it straight into
;;; Modeline segments
(defun +modeline-sanitize-string (string)
"Sanitize a string for `format-mode-line'."
(when string
(string-replace "%" "%%" string)))
(defun +modeline-buffer-name (&optional spacer) ; gonsie
"Display the buffer name."
(concat (or spacer +modeline-default-spacer)
(propertize
(truncate-string-to-width (buffer-name)
(min 24 (/ (window-width) 3))
nil ?\ t)
'help-echo (or (buffer-file-name)
(buffer-name))
'mouse-face 'mode-line-highlight)))
(let ((bufname (string-replace "%" "" (buffer-name))))
(concat (or spacer +modeline-default-spacer)
(propertize
(truncate-string-to-width bufname
(min 24 (/ (window-width) 3))
nil ?\ t)
'help-echo (or (buffer-file-name)
(buffer-name))
'mouse-face 'mode-line-highlight))))
(defcustom +modeline-minions-icon "&"
"The \"icon\" for `+modeline-minions' button."