Skip to content

Bound wallpaper resource use when sampling bar colors - #14281

Merged
dhh merged 5 commits into
omacom:quattrofrom
aholbreich:bound-bar-wallpaper-sampling
Oct 27, 2026
Merged

dhh merged 5 commits into
omacom:quattrofrom
aholbreich:bound-bar-wallpaper-sampling

Conversation

@aholbreich

@aholbreich aholbreich commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #14167.
Refs #8906

Problem

The transparent bar samples its wallpaper through ImageMagick. The existing [0] selector bounds multi-frame backgrounds, but a single highly compressed, high-resolution image still expands at source size before the resize. ImageMagick's default memory limit follows available RAM and its disk cache is unlimited; on Omarchy /tmp is normally tmpfs.

A sandboxed 12000×8000 RGB PNG (291 KiB on disk) made the current helper peak at 1.36 GB RSS just to choose between two configured colors.

Change

Bound this best-effort sample to:

  • 512 MiB of ImageMagick pixel-cache memory with map and disk spill disabled
  • two ImageMagick threads
  • five seconds, with an external process-group timeout

To keep legitimate 6K and 8K wallpapers inside that bound (Arch's ImageMagick is Q16-HDRI, so a 6K image alone needs about 230 MiB):

  • JPEG decodes at about canvas size (-define jpeg:size)
  • the sample runs on a canvas at most 1920 px wide, since only the bar strip's mean color is needed
  • the image is box-scaled to that canvas (-scale) instead of resized, which avoids a second full-size buffer while still averaging every source pixel (point sampling aliased on fine stripes)

When a wallpaper cannot be sampled inside those bounds, the helper uses its existing configured text-color fallback.

The regressions execute the real helper with stubbed timeout and magick: they check every bound, the scaled canvas for a 6K screen, and that a failed or timed-out sample keeps the configured color. A real-image regression checks that fine stripes are averaged rather than point-sampled.

Testing

  • test/shell.d/bar-text-color-test.sh: 9/9; each new assertion fails against the previous helper (the stripe test also fails with -sample)
  • ./test/cli: 117/117
  • bash -n, git diff --check: pass
  • All 92 stock theme backgrounds, 1080p and 4K screens, three color pairs: same choice as unbounded sampling on quattro (before the scaled canvas, 256 MiB made 31 of them fall back at 1080p and 46 at 4K)
  • 6K (6016×3384) and 8K (7680×4320) JPEG and PNG on 1080p, 4K and 6K screens: all sampled, peak RSS 61–70 MB (JPEG), 275 MB (6K PNG), 425 MB (8K PNG)
  • 12000×8000 PNG: 1.36 GB on quattro; 12.7 MB fallback with this change
  • High-frequency stripes (4K–8K sources, 25/33/50/75 % white, every phase, 1080p and 4K screens): -scale matches unbounded -resize in 22/22 cases; -sample differed in 6 (4 clear wrong picks). -scale peaks within 1 % of -sample (max 0.8 s)

Measured in Bubblewrap with ImageMagick 7.1.2-31 Q16-HDRI. No live wallpaper or compositor process was changed during testing.

Related: #14220 avoids the second decode when GPU sampling succeeds, but retains this command as its fallback. #8307 reduces repeated work. This change keeps that fallback bounded independently.

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no outstanding findings remain.

Summary

The PR bounds ImageMagick’s memory, disk, thread, and time use when sampling wallpaper colors, and reduces the sampling canvas for high-resolution screens. It adds coverage for resource bounds, fallback behavior, and fine-detail averaging.

Reviews (5) · Last reviewed commit: "Make the stripe test fail when the wallp..." · Reviewed by Greptile

Comment thread test/shell.d/bar-text-color-test.sh Resolved

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head b32a8bcb1a019424b3b528a4dbf3cead137da2cf.

Reviewed the ImageMagick memory/map/disk/time/thread bounds, hard timeout, and existing fallback path. No actionable production-code defect found. The added stub case checks configured limits rather than actual timeout/resource enforcement; I did not run a native ImageMagick/Omarchy wallpaper integration test.

@jandrusk

jandrusk commented Oct 6, 2026

Copy link
Copy Markdown

Bounding this makes sense. One thing to double-check before merging is whether 256 MiB is enough for large-but-legit wallpapers. Arch's ImageMagick is Q16-HDRI (float channels), so a 6K (6016×3384) RGB image is already around 230 MiB of pixel cache before -auto-orient/-resize, and 8K is well over the limit. With map and disk set to 0, those would now silently fall back to the configured text color instead of being sampled.

Could you run it against a 6K and an 8K wallpaper? If they fall back, then either raising the memory limit to around 512 MiB or shrinking at read time where the coder supports it (e.g. -define jpeg:size=512x512 for JPEG) would keep the protection without losing sampling on high-res displays.

The 256 MiB pixel-cache limit made many legitimate wallpapers fall back to
the configured text color: Arch's ImageMagick is Q16-HDRI, so a 6K image
alone needs about 230 MiB, and resizing to a 4K or 6K screen added a second
full-size buffer. 31 of 92 stock theme backgrounds fell back at 1080p, 46 at
4K.

Raise the limit to 512 MiB, let JPEG decode at about canvas size, sample on
a canvas at most 1920 px wide, and point-sample to it instead of resizing.
Only the bar strip's mean color is needed. All 92 stock backgrounds now make
the same choice as unbounded sampling, 6K and 8K JPEG and PNG are sampled,
and a 96 MP PNG still falls back cheaply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aholbreich

Copy link
Copy Markdown
Contributor Author

Good catch, you're right, and it was worse than 6K/8K photos: many stock theme backgrounds are 6K WebP, so 256 MiB made 31 of the 92 fall back at 1080p and 46 at 4K.

Measured with ImageMagick 7.1.2 Q16-HDRI in a sandbox:

  • 512 MiB alone: 6K sampled, but 8K still fell back on 4K and 6K screens, because resizing to the screen adds a second large buffer.
  • Pushed now: 512 MiB, -define jpeg:size, and point-sampling to a canvas at most 1920 px wide, since only the bar strip's mean color is needed. All 92 stock backgrounds make the same choice as unbounded sampling, and 6K/8K JPEG and PNG all sample (peak 61–70 MB JPEG, 275 MB 6K PNG, 425 MB 8K PNG). A 96 MP PNG still falls back at 13 MB (1.36 GB unbounded).

Test updated and PR description refreshed.

Comment thread bin/omarchy-bar-text-color Resolved
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for measuring this across all the stock backgrounds. 512 MiB plus jpeg:size covers my 6K/8K concern.

One remaining gap: I think Greptile's P1 on -sample is valid. Point sampling down to 1920 px can alias on fine light/dark detail and pick the wrong text color. -scale is a cheap box filter that still averages pixels and should stay well within the memory bound. Could you try it, ideally with a small high-frequency test image?

@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for measuring against the stock backgrounds. All 92 making the same choice as unbounded sampling is convincing, and 512 MiB plus jpeg:size keeps the protection. LGTM.

On Greptile's point-sampling note: if it ever matters, -scale averages pixels with a box filter and is much cheaper than -resize, so it would avoid the aliasing on high-frequency wallpapers without bringing back -resize's second big buffer. Not blocking.

Point sampling to the canvas could land on one phase of fine stripes and
pick the wrong text color. Box scaling averages every source pixel at
about the same memory cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aholbreich

Copy link
Copy Markdown
Contributor Author

You were right, and -sample loses on exactly the case you described. I tested it with 4K–8K stripe wallpapers (25 %, 33 %, 50 % and 75 % white, every stripe phase) on 1080p and 4K screens. -sample differed from unbounded -resize in 6 of 22 cases: 4 clear wrong picks on the 25 % and 75 % patterns, 2 flips on the 50 % one. -scale matched -resize in all 22. Memory is the same: -scale peaks within 1 % of -sample, and its worst time was 0.8 s, well inside the 5 s limit. All 92 stock backgrounds still make the same choice as quattro, and the 6K/8K JPEG and PNG cases all still sample.

Pushed as 0b80c02: -scale instead of -sample, plus a regression test with a quarter-white stripe image that fails with -sample. Shell test 9/9, ./test/cli 117/117.

@jandrusk

jandrusk commented Oct 8, 2026

Copy link
Copy Markdown

Thanks for testing it against the stripe cases. 22/22 matching -resize with -scale, at -sample's memory cost, is a clear win, and the quarter-white regression test is a good catch. LGTM.

The stripe assertion expected the configured text color, which is also what
the helper prints when ImageMagick gives up, so a sample that never ran passed
it. Swap the colors so only a finished, averaged sample produces the expected
one; point sampling and a failed sample both still fail it.

Co-Authored-By: Codex Medium <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 0ce821c, tested on a disposable Omarchy worker (ImageMagick 7.1.2-33 Q16-HDRI). The fix is real and proportionate.

Reproduction. A 290 KB, 12000×8000 RGB PNG made the quattro helper peak at 1.3 GB RSS at 1080p and 1.6 GB at 4K. With this branch it stays at 12 MB and keeps the configured text color. 6K and 8K JPEGs dropped from 343–923 MB to 59–69 MB with the same color choice. Every stock theme background at 1080p and 4K, with the bar at the top and bottom and two color pairs, makes the same choice as quattro: 736 cases, none differ. With the quattro helper put back, the resource-bound test fails.

Tests. test/shell.d/bar-text-color-test.sh passed 9/9 and ./test/cli passed 117/117 on the worker.

Pushed: 0ce821c. The stripe test expected #ffffff, which is also the configured text color the helper prints when ImageMagick gives up, so the test passed even when no sample was taken. The two colors are now swapped, so only a finished, averaged sample produces the expected color. On the worker, -sample still fails the test, and so does a magick that always exits with an error.

One cost, for the maintainer. RGB PNGs at 5K, 6K and 8K still sample. 6K and 8K PNGs with an alpha channel do not: ImageMagick runs out of its 512 MiB cache while decoding them, so they keep the configured text color where quattro chose the contrasting one. 768 MiB lets the 6K case through. Both reviewers would keep 512 MiB, but the limit is a judgement call.

Overlap. #8307 changes the same geometry and the same magick call, and #14220 restructures this helper around a shell-side sample. Whichever lands second will need reconciling with the others.

Second opinion. Codex Medium reviewed it in two rounds. It found the vacuous stripe assertion and had nothing left on the final head. On its own fixtures it confirmed the canvas geometry for landscape, portrait and ultrawide screens and all four bar positions, and it found the RGBA failure happens during decoding. Its independence from this review is not guaranteed.

This now waits on the maintainer.

@dhh
dhh merged commit 40054aa into omacom:quattro Oct 27, 2026
1 check passed
dhh pushed a commit that referenced this pull request Oct 27, 2026
* Bound wallpaper resource use when sampling bar colors

* Test the configured-color fallback when a wallpaper sample fails or times out

* Sample 6K and 8K wallpapers within the bar color memory bound

The 256 MiB pixel-cache limit made many legitimate wallpapers fall back to
the configured text color: Arch's ImageMagick is Q16-HDRI, so a 6K image
alone needs about 230 MiB, and resizing to a 4K or 6K screen added a second
full-size buffer. 31 of 92 stock theme backgrounds fell back at 1080p, 46 at
4K.

Raise the limit to 512 MiB, let JPEG decode at about canvas size, sample on
a canvas at most 1920 px wide, and point-sample to it instead of resizing.
Only the bar strip's mean color is needed. All 92 stock backgrounds now make
the same choice as unbounded sampling, 6K and 8K JPEG and PNG are sampled,
and a 96 MP PNG still falls back cheaply.



* Average wallpaper detail when scaling the bar color sample

Point sampling to the canvas could land on one phase of fine stripes and
pick the wrong text color. Box scaling averages every source pixel at
about the same memory cost.



* Make the stripe test fail when the wallpaper sample does not finish

The stripe assertion expected the configured text color, which is also what
the helper prints when ImageMagick gives up, so a sample that never ran passed
it. Swap the colors so only a finished, averaged sample produces the expected
one; point sampling and a failed sample both still fail it.




---------




(cherry picked from commit 40054aa)

Co-authored-by: Alexander Holbreich <holbreich@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Codex Medium <noreply@openai.com>
omarchybot added a commit to dt-lindberg/omarchy that referenced this pull request Oct 27, 2026
…lback

omacom#14281 bounded the helper's ImageMagick run; that block now lives in sample_background, which only runs without a --sample. quattro removed background-test.sh and the bar test's source checks (omacom#16334), so the source checks this branch added there go with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
omarchybot added a commit to ryanyogan/omarchy that referenced this pull request Oct 27, 2026
Both conflicts resolve to quattro's side. bin/omarchy-bar-text-color takes omacom#14281's bounded sampling, which covers this branch's downscale. test/shell.d/runtime-smoke-test.sh was restructured on quattro, so the bar test is rewritten against it in a later commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
omarchybot added a commit to ryanyogan/omarchy that referenced this pull request Oct 27, 2026
The merge took quattro's omarchy-bar-text-color, whose 1920px canvas, JPEG size hint and resource caps from omacom#14281 already bound the sample this branch shrank, so its tests for the old downscale go with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh pushed a commit that referenced this pull request Oct 27, 2026
…tate writes (#8307)

* Stop re-sampling the wallpaper for the transparent bar on unrelated state writes

The bar watched ~/.local/state/omarchy/current for background changes. A
directory path never sits in QFileSystemWatcher's file set, so Quickshell's
FileView re-emitted fileChanged for every entry created, renamed or removed
in ~/.local/state/omarchy as well. Any plugin writing there atomically
(tmp + rename) re-ran omarchy-bar-text-color, and on a 5K display that
ImageMagick pass cost ~2.6 core-seconds across every thread. One plugin
saving every 10 s held ~40% of a core for the whole session, invisible in
quickshell's own CPU figure because magick is a reaped grandchild.

Watching the symlink directly does not work: inotify follows it to the old
image and ln -nsf never touches that inode. Keep the directory watch, resolve
the link with readlink -f and only refresh when the wallpaper actually moved.

Sample at a reduced scale in omarchy-bar-text-color too. The strip is
averaged to one pixel, so shrink the geometry by an integer factor (never
upscale) and let the JPEG decoder skip the detail: 2.58 -> 0.065
core-seconds per sample on a 2912x1632 JPEG at 5120x2160, same result.

* Resolve the background link at startup and cover the watcher in the runtime smoke test

FileView reports no change for its initial load, so without a baseline the
first unrelated write in the state directory still compared against "" and
sampled once. Run the probe when the bar starts.

The smoke test now stubs omarchy-bar-text-color and counts calls in the
running shell: turning transparency on samples once, an atomic write of an
unrelated file in ~/.local/state/omarchy does not sample again, and
repointing current/background does. Against the previous Bar.qml the
unrelated write registers as a second sample and the test fails.

* Drop the reduced-scale helper tests, which #14281 covers

The merge took quattro's omarchy-bar-text-color, whose 1920px canvas, JPEG size hint and resource caps from #14281 already bound the sample this branch shrank, so its tests for the old downscale go with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Watch inside current/ so unrelated state writes do not re-sample the bar

FileView watches its path's parent directory too, and re-emits fileChanged for every entry created, renamed or removed there whenever the path itself is not a watched file. Watching ~/.local/state/omarchy/current made that parent ~/.local/state/omarchy, which plugins write to constantly, so the transparent bar re-ran ImageMagick on every unrelated save. Watching current/theme moves the parent to current/, where omarchy-theme-set swaps the theme and omarchy-theme-bg-set repoints the background link, and both still arrive. This replaces a readlink probe that resolved the link on every event: no extra process, and a theme switch that lands on a same-named background still re-samples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>

---------

Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Omarchybot <omabot@omarchy.org>
Co-authored-by: Codex Medium <noreply@openai.com>
dhh pushed a commit that referenced this pull request Oct 27, 2026
…tate writes (#8307) (#16799)

* Stop re-sampling the wallpaper for the transparent bar on unrelated state writes

The bar watched ~/.local/state/omarchy/current for background changes. A
directory path never sits in QFileSystemWatcher's file set, so Quickshell's
FileView re-emitted fileChanged for every entry created, renamed or removed
in ~/.local/state/omarchy as well. Any plugin writing there atomically
(tmp + rename) re-ran omarchy-bar-text-color, and on a 5K display that
ImageMagick pass cost ~2.6 core-seconds across every thread. One plugin
saving every 10 s held ~40% of a core for the whole session, invisible in
quickshell's own CPU figure because magick is a reaped grandchild.

Watching the symlink directly does not work: inotify follows it to the old
image and ln -nsf never touches that inode. Keep the directory watch, resolve
the link with readlink -f and only refresh when the wallpaper actually moved.

Sample at a reduced scale in omarchy-bar-text-color too. The strip is
averaged to one pixel, so shrink the geometry by an integer factor (never
upscale) and let the JPEG decoder skip the detail: 2.58 -> 0.065
core-seconds per sample on a 2912x1632 JPEG at 5120x2160, same result.

* Resolve the background link at startup and cover the watcher in the runtime smoke test

FileView reports no change for its initial load, so without a baseline the
first unrelated write in the state directory still compared against "" and
sampled once. Run the probe when the bar starts.

The smoke test now stubs omarchy-bar-text-color and counts calls in the
running shell: turning transparency on samples once, an atomic write of an
unrelated file in ~/.local/state/omarchy does not sample again, and
repointing current/background does. Against the previous Bar.qml the
unrelated write registers as a second sample and the test fails.

* Drop the reduced-scale helper tests, which #14281 covers

The merge took quattro's omarchy-bar-text-color, whose 1920px canvas, JPEG size hint and resource caps from #14281 already bound the sample this branch shrank, so its tests for the old downscale go with it.



* Watch inside current/ so unrelated state writes do not re-sample the bar

FileView watches its path's parent directory too, and re-emits fileChanged for every entry created, renamed or removed there whenever the path itself is not a watched file. Watching ~/.local/state/omarchy/current made that parent ~/.local/state/omarchy, which plugins write to constantly, so the transparent bar re-ran ImageMagick on every unrelated save. Watching current/theme moves the parent to current/, where omarchy-theme-set swaps the theme and omarchy-theme-bg-set repoints the background link, and both still arrive. This replaces a readlink probe that resolved the link on every event: no extra process, and a theme switch that lands on a same-named background still re-samples.




---------





(cherry picked from commit bc220e7)

Co-authored-by: Ryan Yogan <ryanyogan@gmail.com>
Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Codex Medium <noreply@openai.com>
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Oct 29, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Oct 29, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Oct 29, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Oct 29, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Nov 2, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Nov 2, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Nov 2, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
cristian-fleischer pushed a commit to cristian-fleischer/okimarchy that referenced this pull request Nov 2, 2026
A bar is usually set further off the edges it spans than off the one it
hangs from — sketchybar and waybar both inset 8 at the sides and 4 at the
top — which a single margin cannot express. Read the gap through
Geometry.parseWidthSpec, the width spec the border widths already take, so
margin accepts N, "Y X", "T X B" or "T R B L" with no new vocabulary. A
scalar still means every edge.

omarchy-bar-text-color crops the wallpaper at the screen edge to choose a
legible transparent-mode foreground, a strip a detached bar no longer
covers. It takes an --inset now, applied to all four crops.

At margin 0 the crops are byte-identical, so a flush bar is untouched.

[Rebased onto the full-screen bar window (omacom#6782): the margins inset the
painted strip instead of the window. Drag points need no offset there, so
the windowScreenPoint() change is dropped. Rebased again onto bounded
wallpaper sampling (omacom#14281): the insets scale with the 1920 px sample
canvas. The Bar.qml and Style.qml source asserts are dropped, as upstream
no longer keeps source-text tests (omacom#16334).]
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web-planted wallpapers are decoded by multiple C parsers in the user session; a legal 254KB file costs 566MB RAM / 4.75s per decode

6 participants