From e8ea03ecc8c1a2499046b34f785bca4f871531df Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 28 Jun 2026 03:20:12 -0400 Subject: feat: fit and center the weather buffer in its window Centering and auto-fit share one resize hook (wttrin--update-layout on window-configuration-change-hook). Centering is always on. The block centers via the window's left margin, measured in pixels from the buffer font so it stays exact under a font-height remap. It centers against the available width including the current margin, so the margin shrinking the body can't make the value oscillate. Auto-fit is opt-in (wttrin-auto-fit-font, off by default). When on, the font is sized so the whole buffer fits top to bottom (down to the row past the footer's last menu item) without the widest line truncating, clamped to wttrin-font-height-min and -max. The pixel-exact measurement needs window-font-width and window-font-height, so the minimum is now Emacs 25.1. --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.org') diff --git a/README.org b/README.org index 0043fe3..8701468 100644 --- a/README.org +++ b/README.org @@ -8,7 +8,7 @@ [[https://github.com/cjennings/emacs-wttrin/actions/workflows/ci.yml][file:https://github.com/cjennings/emacs-wttrin/actions/workflows/ci.yml/badge.svg]] [[https://coveralls.io/github/cjennings/emacs-wttrin?branch=main][file:https://coveralls.io/repos/github/cjennings/emacs-wttrin/badge.svg?branch=main]] -Wttrin is a simple Emacs frontend for Igor Chubin's [[https://github.com/chubin/wttr.in][wttr.in]] weather service. It works with Emacs 24.4+ and needs [[https://github.com/atomontage/xterm-color][xterm-color]] for the colored ASCII art (MELPA handles that dependency for you). +Wttrin is a simple Emacs frontend for Igor Chubin's [[https://github.com/chubin/wttr.in][wttr.in]] weather service. It works with Emacs 25.1+ and needs [[https://github.com/atomontage/xterm-color][xterm-color]] for the colored ASCII art (MELPA handles that dependency for you). [[assets/wttrin.png]] -- cgit v1.2.3