Skip to content

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
omacom:quattrofrom
steelcityappliance:fix/toggle-bar-direction-10357
Open

Align omarchy toggle bar on/off with its help text (or confirm the current direction is intended)#10635
steelcityappliance wants to merge 1 commit into
omacom:quattrofrom
steelcityappliance:fix/toggle-bar-direction-10357

Conversation

@steelcityappliance

Copy link
Copy Markdown
Contributor

The question first

omarchy toggle bar looks inverted against its own help, but there's a signal it might be deliberate, so I'd rather ask than assume.

What this PR does, if on = visible is what you want

  • Maps on → clear the bar-off flag (show), off → set it (hide), toggle passed through, bad arg exits with usage — mirroring omarchy-toggle-idle.
  • Updates toggle-test.sh bar assertions and the three on/off calls in session-test.sh to 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.sh 12/12 on bash 3.2 after the change; bash -n clean 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy toggle bar on/off behaves in reverse

1 participant