summary refs log tree commit diff stats
path: root/lisp/acdw-modeline.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-14 16:56:56 -0500
committerCase Duckworth2021-09-14 16:56:56 -0500
commit4c9d8ea075657b1c35d3b7352043725b59525a82 (patch)
tree0534d2f30c690dbe824a34474241d6b5b44bb72f /lisp/acdw-modeline.el
parentAdd fat-finger-exit (diff)
downloademacs-4c9d8ea075657b1c35d3b7352043725b59525a82.tar.gz
emacs-4c9d8ea075657b1c35d3b7352043725b59525a82.zip
~mehehheheh
Diffstat (limited to 'lisp/acdw-modeline.el')
-rw-r--r--lisp/acdw-modeline.el12
1 files changed, 10 insertions, 2 deletions
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')."
33 33
34(defun acdw-modeline/buffer-name () ; gonsie 34(defun acdw-modeline/buffer-name () ; gonsie
35 "Display the buffer name in a face reflecting its modified status." 35 "Display the buffer name in a face reflecting its modified status."
36 (propertize " %b " 36 (propertize (concat " "
37 (truncate-string (/ (window-total-width) 2)
38 (buffer-name) "~")
39 " ")
37 'face 40 'face
38 (if (buffer-modified-p) 41 (if (buffer-modified-p)
39 'font-lock-warning-face 42 'font-lock-warning-face
40 'font-lock-type-face) 43 'font-lock-type-face)
41 'help-echo (buffer-file-name))) 44 'help-echo (or (buffer-file-name)
45 (buffer-name))))
42 46
43(defun acdw-modeline/erc () 47(defun acdw-modeline/erc ()
44 "ERC indicator for the modeline." 48 "ERC indicator for the modeline."
@@ -151,6 +155,10 @@ is, if point < mark."
151 (region-bounds)))) 155 (region-bounds))))
152 'font-lock-face 'font-lock-variable-name-face)))) 156 'font-lock-face 'font-lock-variable-name-face))))
153 157
158(defun acdw-modeline/reading-mode ()
159 "Display an indicator if currently in reading mode, mine or EWW's."
160 (concat (if reading-mode "R" "") (if eww-readable-p "w" "")))
161
154(defun acdw-modeline/text-scale () 162(defun acdw-modeline/text-scale ()
155 "Display the text scaling from the modeline, if scaled." 163 "Display the text scaling from the modeline, if scaled."
156 ;; adapted from https://github.com/seagle0128/doom-modeline 164 ;; adapted from https://github.com/seagle0128/doom-modeline