Repository navigation
Show the nighttime fog icon in the bar - #9367
Closed
chessing234 wants to merge 2 commits into
Closed
chessing234 wants to merge 2 commits into
chessing234 wants to merge 2 commits into
Conversation
The weather panel's Model.iconForCode resolves fog codes 143, 248 and 260 to a nighttime glyph after sunset, but omarchy-weather-icon returned the daytime glyph for those three codes at every hour. The script already computes `night` from the live sunrise/sunset it fetches, and every other day/night-aware arm of the same case statement uses it; the fog arm was the one that did not.
Stubs curl and date so the script sees a fixed wttr payload and a fixed clock, then sweeps one code from every arm of its case statement past sunrise and past sunset, comparing each result against Model.iconForCode rather than a second hand-written copy of the mapping. Against the unfixed script the nighttime sweep reports codes 143, 248 and 260 as mismatched and the daytime sweep still passes.
Contributor
Author
|
@dhh @ryanrhughes ready for review |
chessing234
added a commit
to chessing234/omarchy
that referenced
this pull request
Sep 21, 2026
Folded from omacom#9367.
Contributor
Author
|
folded into #12115 so the weather icon review stays with the other bar panel tweaks. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
omarchy-weather-iconfetches the live sunrise and sunset from wttr.in and setsnightfrom them, then maps the weather code to a glyph. Every day/night-aware arm of that case statement branches onnightexcept the fog one:The panel disagrees.
shell/plugins/panels/weather/Model.jsresolves the same three wttr codes asnight ? "" : "", andiconForOpenMeteoCoderoutes Open-Meteo 45/48 through them. So after sunset in fog or mist the bar showed the daytime glyph while the panel showed the nighttime one, for the same condition at the same moment.The fix branches the fog arm on
nightwith the same two codepoints the panel uses.Verification, with the repo's shell suite: the new sweep in
test/shell.d/weather-test.shstubscurlanddateso the script sees a fixed wttr payload and a fixed clock, then runs the realbin/omarchy-weather-iconfor one code from every arm of its case statement — plus an unmapped code for the fallback — once past sunrise and once past sunset, comparing each result toModel.iconForCoderather than to a second copy of the mapping.Reverting only the one-line
bin/change and re-running gives:The whole
weather-test.shfile passes with the fix in place.