diff options
author | Case Duckworth | 2021-04-30 12:49:58 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-30 12:49:58 -0500 |
commit | dfab28d79fc690ed4f5913909fe65446d1dc2788 (patch) | |
tree | b22a9a0dfa20ce08ddb898068ee91d24d40b65c1 | |
parent | Change which-key popup delay (diff) | |
download | emacs-dfab28d79fc690ed4f5913909fe65446d1dc2788.tar.gz emacs-dfab28d79fc690ed4f5913909fe65446d1dc2788.zip |
Add the text scale to the modeline
-rw-r--r-- | init.el | 1 | ||||
-rw-r--r-- | lisp/acdw-modeline.el | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/init.el b/init.el index 0a82bfd..307b753 100644 --- a/init.el +++ b/init.el | |||
@@ -939,6 +939,7 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
939 | simple-modeline-segment-position | 939 | simple-modeline-segment-position |
940 | simple-modeline-segment-word-count) | 940 | simple-modeline-segment-word-count) |
941 | (simple-modeline-segment-misc-info | 941 | (simple-modeline-segment-misc-info |
942 | acdw-modeline/text-scale | ||
942 | simple-modeline-segment-process | 943 | simple-modeline-segment-process |
943 | acdw-modeline/god-mode-indicator | 944 | acdw-modeline/god-mode-indicator |
944 | acdw-modeline/minions | 945 | acdw-modeline/minions |
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))) |