From dfab28d79fc690ed4f5913909fe65446d1dc2788 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 30 Apr 2021 12:49:58 -0500 Subject: Add the text scale to the modeline --- lisp/acdw-modeline.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/acdw-modeline.el') 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." (minions-minor-modes-menu))))) 'mouse-face 'mode-line-highlight))) +(defun acdw-modeline/text-scale () + ;; adapted from https://github.com/seagle0128/doom-modeline + (when (and (boundp 'text-scale-mode-amount) + (/= text-scale-mode-amount 0)) + (format + (if (> text-scale-mode-amount 0) + " (%+d)" + " (%-d)") + text-scale-mode-amount))) + (defun acdw-modeline/vc-branch () ;; from https://www.gonsie.com/blorg/modeline.html, from Doom (if-let ((backend (vc-backend buffer-file-name))) -- cgit 1.4.1-21-gabe81