nyxt: Update my-format-status.

master
Pierre Neidhardt 2020-07-11 20:22:27 +02:00
parent 39a902d385
commit 46630ac650
1 changed files with 10 additions and 7 deletions

View File

@ -203,11 +203,10 @@ format."
"~/.local/share/emacs/site-lisp"))
(defun my-format-status (window)
(declare (ignore window))
(let* ((buffer (current-buffer))
(let* ((buffer (current-buffer window))
(buffer-count (1+ (or (position buffer
(sort (buffer-list)
#'<
#'string<
:key #'id))
0))))
(str:concat
@ -217,11 +216,15 @@ format."
(str:downcase
(class-name (class-of m)))))
(modes buffer)))))
(format nil " (~a/~a) ~a — ~a"
(format nil " (~a/~a) "
buffer-count
(length (buffer-list))
(object-display (url buffer))
(title buffer)))))
(length (buffer-list)))
(format nil "~a~a — ~a"
(if (eq (slot-value buffer 'load-status) :loading)
"(Loading) "
"")
(object-display (url buffer))
(title buffer)))))
(define-configuration window
((status-formatter #'my-format-status)))