From 4c9d8ea075657b1c35d3b7352043725b59525a82 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 14 Sep 2021 16:56:56 -0500 Subject: ~mehehheheh --- lisp/acdw-modeline.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lisp/acdw-modeline.el') diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 5aa0a18..6e5afb8 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -33,12 +33,16 @@ Otherwise, cdr should be a function that takes two points (see `count-words')." (defun acdw-modeline/buffer-name () ; gonsie "Display the buffer name in a face reflecting its modified status." - (propertize " %b " + (propertize (concat " " + (truncate-string (/ (window-total-width) 2) + (buffer-name) "~") + " ") 'face (if (buffer-modified-p) 'font-lock-warning-face 'font-lock-type-face) - 'help-echo (buffer-file-name))) + 'help-echo (or (buffer-file-name) + (buffer-name)))) (defun acdw-modeline/erc () "ERC indicator for the modeline." @@ -151,6 +155,10 @@ is, if point < mark." (region-bounds)))) 'font-lock-face 'font-lock-variable-name-face)))) +(defun acdw-modeline/reading-mode () + "Display an indicator if currently in reading mode, mine or EWW's." + (concat (if reading-mode "R" "") (if eww-readable-p "w" ""))) + (defun acdw-modeline/text-scale () "Display the text scaling from the modeline, if scaled." ;; adapted from https://github.com/seagle0128/doom-modeline -- cgit 1.4.1-21-gabe81