aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-28 06:52:52 -0400
committerCraig Jennings <c@cjennings.net>2026-06-28 06:52:52 -0400
commitbcdb5889bc7f38ce1e87c495b6f186b62e45467a (patch)
tree76d787b8ac41cfa6c74971e786c6bf79ff6c0ba4
parent16be44154cf823332332d1df995ae1ed50ff43c4 (diff)
downloademacs-wttrin-bcdb5889bc7f38ce1e87c495b6f186b62e45467a.tar.gz
emacs-wttrin-bcdb5889bc7f38ce1e87c495b6f186b62e45467a.zip
docs: document auto-fit and buffer centering
Add an "Auto-Fit and Centering" subsection to the README font settings: the weather block centers automatically, and wttrin-auto-fit-font (with the min/max floor and cap) opts into sizing the font to the window.
-rw-r--r--README.org13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.org b/README.org
index dea324a..cd419c1 100644
--- a/README.org
+++ b/README.org
@@ -185,6 +185,19 @@ You can change the font size by changing the font height. The default is 130. No
(setq wttrin-font-height 120)
#+end_src
+*** Auto-Fit and Centering
+The weather block is centered horizontally in the window, so the art sits in the middle rather than hugging the left edge. That's automatic; there's nothing to set.
+
+If you'd rather the font size itself to the window, turn on auto-fit. When it's on, =wttrin= grows or shrinks the font so the whole report fits top to bottom (down to the row just past the footer), clamped between a floor and a cap, and recomputes when you resize the window.
+
+#+begin_src emacs-lisp
+ (setq wttrin-auto-fit-font t) ;; off by default
+ (setq wttrin-font-height-min 100) ;; floor: never smaller than this
+ (setq wttrin-font-height-max 200) ;; cap: never larger than this
+#+end_src
+
+With auto-fit off (the default) the font stays fixed at =wttrin-font-height= above.
+
*** Unit System
Wttrin's default is to select the unit system appropriate for the location you query. If you'd rather see everything in the units you're used to: