Repository navigation
Conversation
Automated AI review
Outcome: On all-portrait setups, wallpaper changes in themes without twins and image theme switches stall. Transition frames have no missing-twin fallbackThe transition frames use Suggested change: Resolve the twin from the durable path, check once per panel that it exists before any frame binds to it, and only rewrite paths inside a Reproducer (fails at 0b551cd)Reproducer: transition frames have no missing-twin fallback (reviewed head 0b551cd)1. Test in the style of
|
0b551cd to
7ca5fbe
Compare
[Medium impact] The changes affect wallpaper display and theme transitions across desktop screens. The previous wallpaper hang is fixed, but the tests must follow the repository’s existing-suite requirement before merging. Findings
SummaryAdds portrait wallpaper twins while keeping one shared background link.
Reviews (5) · Last reviewed commit: "Drop an undecodable twin on the transiti..." · Reviewed by Greptile |
|
@llstrk Thanks for the review and the reproducers. This is now rebased onto
|
|
Tested live on Hyprland with DP-2 (3840x2160, landscape) and DP-1 (2560x1440, transform 1), running this branch's shell from a checkout. I drove it over the background IPC and checked the middle of each output with
Testing turned up one issue, fixed in e360398. The twin check that a theme switch repeats could answer mid-reveal and move the portrait screen's base frame to another file while nothing covered it, which showed as an empty frame. The answers for the landing path are now dropped when the reveal finishes, while the incoming frame still covers every screen, and the transition finishes only once both probes have answered. Separately, when two themes ship a background with the same file name, the previous theme's image stays on screen after the switch. Untouched |
A theme may ship backgrounds/portrait/<same file name>, as may a user's ~/.config/omarchy/backgrounds/<theme>/. The background plugin shows that twin on screens taller than wide and the plain file elsewhere, for the base frame and both transition frames, so one current/background link serves a landscape and a rotated monitor at once. The size probe that already reads each wallpaper's header also probes the twin and records whether it was found. A portrait screen binds the twin only once the probe has found it, waits for the probe the way frames already wait for the native size, and falls back to the plain file when the twin is missing or will not decode. omarchy-theme-set snapshots the twin next to the plain snapshot so theme switches and the prepared frame reveal it too, and removes both together. A forced reload or a theme switch landing on the same durable path probes the file and its twin again, since the files behind the path have changed. The fixture runs the plugin on the compositor with the first screen made portrait, through boot, two reveals, a background without a twin and a twin appearing behind the same path.
e360398 to
90c6f49
Compare
|
Rebased onto What changed in the port:
Not covered: the theme intro cover ( For context, #10249 and #11451 overlap with this one (named monitor overrides in |
The incoming and old frames bound a twin that passed the size probe but failed to decode and then waited on the error. On a setup where every screen is portrait no screen reached incomingReady(), so the reveal never started and the old wallpaper stayed up. Both frames now drop the twin on Image.Error and bind the plain file, as the base frame already did.
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" |
There was a problem hiding this comment.
This adds a separate test suite even though background-pending-theme-test.sh already tests this plugin’s reveals and video-background-test.sh tests its snapshots. The repository requires extending an existing test file for the area rather than adding another *-test.sh. Move these checks into those existing suites before merging.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Discussion with the design and alternatives: #11533
What
A theme may ship
backgrounds/portrait/<same file name>. The background plugin shows the twin on screens taller than wide and the plain file elsewhere — for the base frame and both transition frames — so onecurrent/backgroundlink serves a landscape and a rotated monitor at once.magick identify -ping) also probes the twin, and records whether it was found. A portrait screen binds a twin only once the probe has found it, and waits for the probe the same way frames already wait for the native size. Themes without twins behave exactly as before.backgroundsfolder,~/.config/omarchy/backgrounds/<theme>/or the transition snapshot folder have twins. Landscape screens never rewrite a path.omarchy-theme-setsnapshots the twin asbackground-transitions/portrait/<snapshot name>next to the plain snapshot, so theme switches and the prepared frame reveal the twin too; the snapshots are removed together. When a theme switch's reveal finishes, the durable path and its twin are probed again, since two themes can ship the same file name.BackgroundIntro) draws the outgoing still as one file on every screen, so with intros on, a portrait screen shows the landscape image under the cover for the length of the intro. Fine as a follow-up once the convention is in.bg nextor theme switching: they listbackgrounds/with-maxdepth 1, so the subfolder is never offered as a wallpaper. Videos are untouched (OWE draws them).Why
On a 3840x2160 + rotated 2560x1440 setup the portrait screen shows the landscape image cropped to its middle third; the subject is usually cut off. Themes had no way to express an alternative.
Testing
test/shell.d/background-portrait-twins-test.sh. The bash part runssnapshot_background_path/remove_background_snapshotsagainst a theme with and without a twin, a user background and a picture outsidebackgrounds/. The fixture runs the plugin itself on the compositor with the first screen made portrait: the twin is on that screen at boot, stays through two reveals, gives way to the plain file for a background without a twin, and comes back when a twin appears behind the same path and the path is reloaded.background-pending-theme,background-startup*,background-intro*,video-backgroundandtheme-background-memorytests pass alongside.Reference theme using the convention: https://github.com/kravens/omarchy-bitcoin-frontier-theme