From 50564053ca77f3e782b4ab979265af697da543da Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Tue, 9 Dec 2025 12:07:09 -0500 Subject: [PATCH] [mode-line] Change modeline incipit --- global.org | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/global.org b/global.org index b1607a2..d017d73 100644 --- a/global.org +++ b/global.org @@ -402,7 +402,7 @@ ;Still needs some improvements, does not report Readonly state mode-line-remote '(:eval (let ((s (format-mode-line "%@"))) (cond - ((equal s "-") " ") ((equal s "@") "@") (t s))))) + ((equal s "-") "·") ((equal s "@") "@") (t s))))) (defface mode-line-indicator '((t nil)) @@ -414,7 +414,7 @@ "Inactive variant of indicator" :group 'mode-line-faces) - (defvar wilder-buffer-vc-mode-line + (defvar wilder-buffer-vc-mode-line '("%b" (vc-mode (:propertize ;; Strip the backend name from the VC status information (:eval (let* ((backend (downcase (symbol-name (vc-backend (buffer-file-name))))) @@ -450,12 +450,35 @@ (len-right (length (format-mode-line mode-line-format-right))) (len-separator (- (+ (window-width) 2 2 2) (+ len-left len-right)))) (format (format "%%%ds" len-separator) "")))) - + (setq grab-handle (concat ""(with-temp-buffer + (insert-image (create-image + "P1 30 10 + 000000000000011110000000000000 + 000000000000011110000000000000 + 000000111100011110001111000000 + 000000111100011110001111000000 + 000000111100011110001111000000 + 000000111100011110001111000000 + 000000000000011110000000000000 + 000000000000011110000000000000 + " 'pbm t :ascent 100) "---") + (buffer-string))) + + grab-handle-unmodified (concat ""(with-temp-buffer + (insert-image (create-image + "P1 30 8 + 000000111100011110001111000000 + 000000111100011110001111000000 + 000000111100011110001111000000 + 000000111100011110001111000000 + " 'pbm t :ascent 100) "---") + (buffer-string)))) (setq mode-line-format-left '("%e" - (:eval (propertize "╺═╸" 'face (if (cogent-line-selected-window-active-p) 'mode-line-indicator 'mode-line-inactive-indicator))) + (:eval (propertize (if (buffer-modified-p) grab-handle + grab-handle-unmodified) + 'face (if (cogent-line-selected-window-active-p) 'mode-line-indicator 'mode-line-inactive-indicator))) mode-line-front-space - mode-line-modified mode-line-remote mode-line-frame-identification wilder-buffer-vc-mode-line