fix: accept boolean aliases for CLAUDE_MENU_BAR env var

CLAUDE_MENU_BAR=0 was silently ignored after 07c1388 added strict
validation. Since CLAUDE_USE_WAYLAND=1 establishes a boolean env var
convention, users naturally try 0/1 for other vars too.

Add alias resolution: 0/false/no/off -> hidden, 1/true/yes/on -> visible.
Named values (auto/visible/hidden) continue to work as before.
Invalid values still fall back to auto with a warning.

Fixes #298

Co-Authored-By: Claude <claude@anthropic.com>
This commit is contained in:
noctuum
2026-03-19 15:12:33 +07:00
parent 3b45c6d0e7
commit e1dbbc2c07
3 changed files with 23 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ Model Context Protocol settings are stored in:
| Variable | Default | Description |
|----------|---------|-------------|
| `CLAUDE_USE_WAYLAND` | unset | Set to `1` to use native Wayland instead of XWayland. Note: Global hotkeys won't work in native Wayland mode. |
| `CLAUDE_MENU_BAR` | unset (`auto`) | Controls menu bar behavior: `auto` (hidden, Alt toggles), `visible` (always shown), `hidden` (always hidden, Alt disabled). See [Menu Bar](#menu-bar) below. |
| `CLAUDE_MENU_BAR` | unset (`auto`) | Controls menu bar behavior: `auto` (hidden, Alt toggles), `visible` / `1` (always shown), `hidden` / `0` (always hidden, Alt disabled). See [Menu Bar](#menu-bar) below. |
### Wayland Support
@@ -37,8 +37,8 @@ By default, the menu bar is hidden but can be toggled with the Alt key (`auto` m
| Value | Menu visible | Alt toggles | Use case |
|-------|-------------|-------------|----------|
| unset / `auto` | No | Yes | Default — hidden, Alt toggles |
| `visible` | Yes | No | Stable layout, no shift on Alt |
| `hidden` | No | No | Menu fully disabled, Alt free |
| `visible` / `1` / `true` / `on` | Yes | No | Stable layout, no shift on Alt |
| `hidden` / `0` / `false` / `off` | No | No | Menu fully disabled, Alt free |
```bash
# Always show the menu bar (no layout shift on Alt)