Open the About window at the size it last settled on (#6770)
* Measure the About layout in UTF-8 so its window is not fitted too narrow wc -L only counts display columns in a UTF-8 locale. A session that never set one leaves it counting the box-drawing and Nerd Font glyphs the About layout is built from as nothing, which measured the content 21 columns narrower than it renders and fitted the window to clip it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Open the About window at the size it last settled on The window used to map at the float rule's starting size, paint, and only then measure itself and resize, so every open flashed one window size and reflowed into another. The size that hugs the content can only be measured from inside the terminal, so remember it and apply it as a window rule before the terminal is spawned: the window now maps at its final size and never moves. A rebranded logo or a new font falls back to the float rule for one launch, refits, and is remembered from then on. The fit itself now moves the window by the cells it is off by, rather than scaling it to the grid, which multiplied up the terminal's padding along with them and left the fit a column or two short. It accepts a cell of slack instead of chasing an exact grid, since a window lands where the terminal's cell boundaries put it, not where it was asked to. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c8fb5be42e
commit
8ca61d6b8b
@@ -20,8 +20,9 @@ o.window({
|
||||
}, { tag = "+floating-window" })
|
||||
|
||||
-- The About fastfetch layout needs more columns than the standard float provides.
|
||||
-- This size only positions the first paint: omarchy-launch-about then measures
|
||||
-- the rendered content and fits the window to it exactly.
|
||||
-- This size only covers the first launch: omarchy-launch-about measures the
|
||||
-- rendered content, remembers the size that hugs it, and applies that as its own
|
||||
-- rule before every later launch.
|
||||
o.window("org.omarchy.about", { float = true })
|
||||
o.window("org.omarchy.about", { center = true })
|
||||
o.window("org.omarchy.about", { size = { 920, 480 } })
|
||||
|
||||
Reference in New Issue
Block a user