Repository navigation
Fit the About window to a logo drawn in colour - #21282
VulpesZerda27 wants to merge 1 commit into
Conversation
The launcher measured the logo with its colour escape codes counted as columns and looked for it, codes included, in a render that has them stripped, so a colour logo was never found and the window stayed at the float rule's size. Strip the codes before measuring and searching. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Confidence Score: 5/5
[Low impact] The PR appears safe to merge. SummaryThe About launcher now removes colour escape codes before measuring a logo and choosing the line used to find it on screen.
Reviews (2) · Last reviewed commit: "Fit the About window to a logo drawn in ..." · Reviewed by Greptile |
|
Codex High reproduced this in Foot on an Omarchy worker. With a 38×19 true-colour logo, About stayed at 920×480 on Opus 5.5 High and muse-wonder via pi, thinking high reviewed the patch and found no defects. The reviewers agreed and may have shared context. GitHub’s Tests and Check translation structure workflows are awaiting approval. |


What changes
About's logo can be any text in
~/.config/omarchy/branding/about.txt, and fastfetch draws colour escape codes in it as colour. The launcher measures that file withwc -L, which counts the codes as columns, and looks for the logo's longest line, codes included, in a render it has stripped them from. So a logo drawn in colour is never found:measure_layoutfails, the window is not fitted and stays at the float rule's 920x480, where the top of the layout scrolls off.This strips the codes before measuring and before searching, the same way the render is stripped. A plain logo measures and is found exactly as before. The sheen still leaves a colour logo alone, as
sheen_buildalready decides.Verification
omarchy-launch-about --renderfromquattroand from this branch in a foot window with About's class, with a 40-column, 17-row logo in 24-bit colour asbranding/about.txt. Onquattrothe window opens at 920x480 and stays there, and no fit is remembered. With the change it settles at 986x789 andabout.fitholds40 17 986 789.logo_dimensionsfor that logo:1168 17before,40 17after. For the default logo:54 26before and after../test/clipasses (143 ok). There is no test file for the About launcher since Speed up test suite and run compositor tests headlessly #19904, so this adds none.logo_dimensions).Screenshots
The window was on a hidden workspace and captured alone; the system details are blurred.
Before, on
quattro:After:
🤖 Generated with Claude Code