Align omarchy toggle bar on/off with its help text (or confirm the current direction is intended) - #10635
Open
steelcityappliance wants to merge 1 commit into
Conversation
The bar's flag is named for the off state, `bar-off`, and omarchy-toggle-bar passed the user-facing action straight through to omarchy-toggle. So `bar on` created the flag and hid the bar, and `bar off` removed it and revealed the bar: the reverse of the command's own summary and examples. The bare toggle was unaffected. Because the flag persists, the hidden state survives shell restarts and reboots, and shows up again after monitor hotplug when the bar re-reads it. Map the explicit actions the other way round before calling omarchy-toggle, pass a bare toggle through, and refuse anything else with a usage line. The IPC nudge after the flip is unchanged. toggle-test.sh asserted the inverted behavior, so its bar assertions now cover on, off, idempotence, both toggle spellings and a rejected action. The acceptance test from omacom#9240 hid the bar with `on` and revealed it with `off`; those calls are swapped so it keeps proving the same layer behavior. Fixes omacom#10357 Fixes omacom#10044 Written by Claude Fable 5.1 via Claude Code, reviewed by Marc Morriss Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
The question first
omarchy toggle barlooks inverted against its own help, but there's a signal it might be deliberate, so I'd rather ask than assume.bin/omarchy-toggle-bar:7forwards toomarchy-toggle bar-off "${1:-toggle}", soonsets thebar-offflag (hides the bar) andoffclears it (shows it) — the opposite of what a user expects.omarchy toggle bar on/offbehaves in reverse #10357, dup Bar layer parks off-screen permanently after "omarchy toggle bar on" — inverted on/off logic in omarchy-toggle-bar #10044) readon= bar visible.test/shell.d/toggle-test.shasserts the current (inverted) behavior and passes, and the acceptance calls insession-test.shwere written the same way (Fix the bar visibility toggle and make the acceptance suite cover 4.0.2 security hardening #9240). That's what makes me unsure whether the current direction is intentional.What this PR does, if
on= visible is what you wanton→ clear thebar-offflag (show),off→ set it (hide),togglepassed through, bad arg exits with usage — mirroringomarchy-toggle-idle.toggle-test.shbar assertions and the threeon/offcalls insession-test.shto the on=visible reading.If the current direction is intentional, please just close this — I've rewritten a passing test here, and I don't want to flip a behavior you meant. Happy to send a docs-only fix instead so the help text matches the code.
Tests
bash test/shell.d/toggle-test.sh12/12 on bash 3.2 after the change;bash -nclean on all three files; bad arg exits 1 with usage. Acceptance + visual verification not run (no Omarchy machine here).Fixes #10357
Related: #10044 (dup), #9240 (added the acceptance calls in the current direction).
Written by Claude Fable 5.1 via Claude Code, reviewed by Marc Morriss