From c05c69351d4bf522cba1486ccdd06891a6428de2 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 3 May 2021 04:21:10 +0100 Subject: total line number in (minibuffer) mode-line --- lib/eos/jao-minibuffer.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index d4a704b..8165d0f 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -90,16 +90,19 @@ (erase-buffer) (insert msg))) +(defconst jao-minibuffer--size + '(:eval (format "/%d" (line-number-at-pos (point-max))))) + +(defconst jao-minibuffer--circe + '(circe-chat-target (:eval (format " [%d]" (length (circe-channel-nicks)))))) + (defvar jao-minibuffer--mode-line-format - '((:propertize " %[%b%]" face mode-line-buffer-id) - (:propertize - (circe-chat-target (:eval (format " [%d] " (length (circe-channel-nicks)))) - " ") - face jao-themes-dimm) - "%+ " + `((:propertize " %[%b%]" face mode-line-buffer-id) + (:propertize ,jao-minibuffer--circe face jao-themes-dimm) + " %+ " (:propertize mode-name face jao-themes-f00) (:propertize ("" minor-mode-alist (vc-mode vc-mode)) face jao-themes-f11) - (:propertize ("%n L%l " (-3 "%P")) face jao-themes-f12) + (:propertize ("%n L%l" ,jao-minibuffer--size) face jao-themes-f12) global-mode-string)) ;;;###autoload -- cgit v1.2.3