From bcdb5889bc7f38ce1e87c495b6f186b62e45467a Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 28 Jun 2026 06:52:52 -0400 Subject: 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. --- README.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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: -- cgit v1.2.3