Repository navigation
Conversation
Style.qml reads six [bar] tokens through barToken(), but applyShellValues() only writes size-horizontal and size-vertical into barOverrides. icon-slot, icon-canvas, icon-font and status-slot are parsed and dropped, so nothing can set them: not a user shell.toml, and not a theme either, since themes go through the same function. Those four lookups can only return their fallback, and an unrecognised key produces no warning, so a [bar] block that does nothing looks like one that works. Pass unknown numeric keys through, the way [font] and [spacing] already do.
The token list came from a pattern that only matched barToken("x") with no space after the parenthesis, and an empty list made the loop run zero times and pass. With the calls written barToken( "x" ) the test passed even with the whitelist restored. Collect the tokens whitespace-tolerantly first and fail if there are none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed and reproduced on an Omarchy worker VM. The bug is real and the fix works. #13137 makes the same change and is the one I'd suggest landing, so this is waiting on the maintainer to choose between the two. Reproduction. A Pushed one commit (7375b1f). Competing fix. #13137 makes the identical Second opinion: Codex Medium, over two rounds. It found the test gap above and nothing wrong with the fix, and found nothing in the pushed commit. Asked separately which of the two PRs to prefer, it chose #13137 for the reasons above; it can read this session's working notes, so treat that as agreement rather than an independent verdict. |
quattro added notch-height to the [bar] whitelist this branch removes. The branch's open else already stores notch-height, which Style.bar.notchHeight reads raw from barOverrides, so the resolution keeps the else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch had stopped merging cleanly, so I merged Reproduction, on an Omarchy worker VM. I ran the real Which of the two PRs. In my earlier comment I suggested taking #13137 instead. I'm reversing that. Both PRs make the same runtime change, and the project's rule for competing fixes is that the first one keeps the credit unless the newer one fixes something the older misses. #13137 doesn't: it fixes no case this one leaves broken. What it does add is worth having here, though: a test in Second opinion: Codex Medium reviewed the merged tree and compared the two PRs. It found the merge resolution correct and the change proportionate, and chose this PR under the same rule. It also named the same test gap and the same parts of #13137 as worth folding in. It can read this session's working notes, so take that as agreement, not an independent verdict. This is verified at 9226c19 and waits on the maintainer. The repository runs no CI on it, so I haven't marked it |
|
| if grep -qF "\"$token\"" <<<"$bar_branch"; then | ||
| fail "[bar] accepts $token without naming it, so new tokens do not need parser changes" |
There was a problem hiding this comment.
This checks that token names are absent from the parser, not that overrides work. Removing barOut[key] = b would leave every token unwritable while the test still passes. A correct parser that explicitly accepts every token would fail instead.
Call applyShellValues with each discovered token and check the resulting value so the test protects behavior rather than parser wording.
|
The I have also prepared the parts of #13137 that this PR lacks, as one commit on top of 9226c19 crediting @cristian-fleischer. It adds the runtime test from |
What's wrong
Style.qmlreads six[bar]tokens:applyShellValues()writes only two of them intobarOverrides:So
icon-slot,icon-canvas,icon-fontandstatus-slotare parsed and dropped. Nothing can set them: not~/.config/omarchy/shell.toml, and not a theme either, since themes go through the same function. Those fourbarTokenlookups can only ever return their fallback.It is silent, too. An unrecognised key produces no warning, so a
[bar]block that does nothing looks like one that works.The fix
Let the
[bar]branch pass unknown numeric keys through, which is what[font]and[spacing]already do:One line. No new tokens, no behaviour change unless someone sets a key that was previously ignored.
On whether you want this at all
I am not sure this is the fix you want, so say the word and I will close it.
The defect is real either way: four properties are unreachable from any configuration. But there are two reasonable directions and it is your call which one:
I went with 1 because
size-horizontalandsize-verticalare already tunable, so bar geometry is not sealed off in principle, and because[font]and[spacing]accept any key. If the intent is that only bar dimensions are configurable and glyph sizing is not, 2 is the right patch and this one should go.For what it is worth, the reason I found this: the weather glyph reads much smaller than its neighbours, since the weather icons are U+E3xx (legacy Weather Icons) while bluetooth and friends are U+F0Bxx (Material Design Icons), which fill their em box far more. That is a font design difference no global token can even out, and #5712 is the same complaint from the waybar era. Being able to set
status-slotandicon-fontis a partial workaround, not a fix for that, and I am not proposing one here.Testing
New
test/shell.d/shell-token-overrides-test.shasserts the invariant rather than the patch: every tokenbarToken()reads must be writable byapplyShellValues. It passes on this branch and fails onquattro, and it would catch the same class of mistake for any token added later.Verified in the running shell: with the patch,
[bar] icon-font = 18in~/.config/omarchy/shell.tomlchanges the bar glyphs afteromarchy-restart-shell, and without it the same block does nothing.