diff options
-rw-r--r-- | init.el | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -2768,10 +2768,18 @@ lui-track-behavior 'before-tracking-next-buffer) :config + (defsubst jao-circe-nick-no () (length (circe-channel-nicks))) + (define-minor-mode jao-circe-user-number-mode "" - :lighter (:eval (format " [%s]" (length (circe-channel-nicks))))) + :lighter (:eval (format " [%s]" (jao-circe-nick-no)))) + + (defun jao-circe-channel-hook () + (if jao-modeline-in-minibuffer + (setq header-line-format + '(" %b" (:eval (format " - %s nicks" (jao-circe-nick-no))))) + (jao-circe-user-number-mode 1))) - (add-hook 'circe-channel-mode-hook #'jao-circe-user-number-mode) + (add-hook 'circe-channel-mode-hook #'jao-circe-channel-hook) (defun circe-command-RECOVER (&rest ignore) "Recover nick" @@ -2786,7 +2794,7 @@ (defun circe-command-NNICKS (&rest _) "Echo number of nicks" (circe-display-server-message - (format "%d nicks in this channel" (length (circe-channel-nicks))))) + (format "%d nicks in this channel" (jao-circe-nick-no)))) (advice-add 'circe-command-NAMES :after #'circe-command-NNICKS) |