summary refs log tree commit diff stats
path: root/lisp/acdw-modeline.el
diff options
context:
space:
mode:
authorCase Duckworth2021-04-30 12:49:58 -0500
committerCase Duckworth2021-04-30 12:49:58 -0500
commitdfab28d79fc690ed4f5913909fe65446d1dc2788 (patch)
treeb22a9a0dfa20ce08ddb898068ee91d24d40b65c1 /lisp/acdw-modeline.el
parentChange which-key popup delay (diff)
downloademacs-dfab28d79fc690ed4f5913909fe65446d1dc2788.tar.gz
emacs-dfab28d79fc690ed4f5913909fe65446d1dc2788.zip
Add the text scale to the modeline
Diffstat (limited to 'lisp/acdw-modeline.el')
-rw-r--r--lisp/acdw-modeline.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 79249bb..7eca143 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el
@@ -73,6 +73,16 @@ indicator in the mode-line."
73 (minions-minor-modes-menu))))) 73 (minions-minor-modes-menu)))))
74 'mouse-face 'mode-line-highlight))) 74 'mouse-face 'mode-line-highlight)))
75 75
76(defun acdw-modeline/text-scale ()
77 ;; adapted from https://github.com/seagle0128/doom-modeline
78 (when (and (boundp 'text-scale-mode-amount)
79 (/= text-scale-mode-amount 0))
80 (format
81 (if (> text-scale-mode-amount 0)
82 " (%+d)"
83 " (%-d)")
84 text-scale-mode-amount)))
85
76(defun acdw-modeline/vc-branch () 86(defun acdw-modeline/vc-branch ()
77 ;; from https://www.gonsie.com/blorg/modeline.html, from Doom 87 ;; from https://www.gonsie.com/blorg/modeline.html, from Doom
78 (if-let ((backend (vc-backend buffer-file-name))) 88 (if-let ((backend (vc-backend buffer-file-name)))