about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-01-25 16:55:44 -0600
committerCase Duckworth2022-01-25 16:55:44 -0600
commit6b355568b075c1cb90c622299c4edba4e65e98dd (patch)
tree84a5d074ed8e2011fd2b36985a42d8a6eeadac35
parentAdd function `font-lock-todo-insinuate' (diff)
downloademacs-6b355568b075c1cb90c622299c4edba4e65e98dd.tar.gz
emacs-6b355568b075c1cb90c622299c4edba4e65e98dd.zip
Customize jabber
-rw-r--r--init.el12
-rw-r--r--lisp/+modeline.el22
2 files changed, 25 insertions, 9 deletions
diff --git a/init.el b/init.el index ed7252e..fe5630a 100644 --- a/init.el +++ b/init.el
@@ -1318,11 +1318,21 @@ See also `crux-reopen-as-root-mode'."
1318 "jabber-pkg.el") 1318 "jabber-pkg.el")
1319 :fork (:repo "https://tildegit.org/acdw/emacs-jabber" 1319 :fork (:repo "https://tildegit.org/acdw/emacs-jabber"
1320 :host nil))) 1320 :host nil)))
1321 (:also-load +jabber)
1322 (:option jabber-account-list '(("acdw@hmm.st"))
1323 jabber-groupchat-buffer-format "%n"
1324 jabber-chat-buffer-format "%n"
1325 jabber-muc-private-buffer-format "%n (%g)"
1326 jabber-activity-show-p #'ignore)
1321 (dolist (mode '(jabber-chat-mode 1327 (dolist (mode '(jabber-chat-mode
1322 jabber-browse-mode 1328 jabber-browse-mode
1323 jabber-roster-mode 1329 jabber-roster-mode
1324 jabber-console-mode)) 1330 jabber-console-mode))
1325 (add-hook (intern (format "%s-hook" mode)) #'visual-fill-column-mode))) 1331 (add-hook (intern (format "%s-hook" mode)) #'visual-fill-column-mode))
1332 (add-hook 'jabber-activity-mode-hook 'tracking-mode)
1333 (:+leader "C-j" jabber-global-keymap)
1334 (advice-add 'jabber-activity-add :after #'+jabber-tracking-add)
1335 (advice-add 'jabber-activity-add-muc :after #'+jabber-tracking-add-muc))
1326 1336
1327(setup (:straight-when keychain-environment 1337(setup (:straight-when keychain-environment
1328 (executable-find "keychain")) 1338 (executable-find "keychain"))
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index 7683269..4217d13 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -57,16 +57,22 @@ This function makes a lambda, so you can throw it straight into
57 57
58;;; Modeline segments 58;;; Modeline segments
59 59
60(defun +modeline-sanitize-string (string)
61 "Sanitize a string for `format-mode-line'."
62 (when string
63 (string-replace "%" "%%" string)))
64
60(defun +modeline-buffer-name (&optional spacer) ; gonsie 65(defun +modeline-buffer-name (&optional spacer) ; gonsie
61 "Display the buffer name." 66 "Display the buffer name."
62 (concat (or spacer +modeline-default-spacer) 67 (let ((bufname (string-replace "%" "" (buffer-name))))
63 (propertize 68 (concat (or spacer +modeline-default-spacer)
64 (truncate-string-to-width (buffer-name) 69 (propertize
65 (min 24 (/ (window-width) 3)) 70 (truncate-string-to-width bufname
66 nil ?\ t) 71 (min 24 (/ (window-width) 3))
67 'help-echo (or (buffer-file-name) 72 nil ?\ t)
68 (buffer-name)) 73 'help-echo (or (buffer-file-name)
69 'mouse-face 'mode-line-highlight))) 74 (buffer-name))
75 'mouse-face 'mode-line-highlight))))
70 76
71(defcustom +modeline-minions-icon "&" 77(defcustom +modeline-minions-icon "&"
72 "The \"icon\" for `+modeline-minions' button." 78 "The \"icon\" for `+modeline-minions' button."