Skip to content

fix(linux): read indicator providers from new config path - #1

Open
gsim-inbolt wants to merge 1 commit into
SebastienBreton:feat/linux-gnome-indicatorfrom
gsim-inbolt:fix/linux-indicator-config-path
Open

fix(linux): read indicator providers from new config path#1
gsim-inbolt wants to merge 1 commit into
SebastienBreton:feat/linux-gnome-indicatorfrom
gsim-inbolt:fix/linux-indicator-config-path

Conversation

@gsim-inbolt

Copy link
Copy Markdown

Problem

The GNOME/Ubuntu indicator reads its provider list from ~/.codexbar/config.json only. New CodexBar installs write their config to ~/.config/codexbar/config.json instead (the CLI already supports both paths). On a new-style install the legacy file is absent, so load_enabled_providers() silently falls back to the hardcoded ["codex", "claude"] default and ignores the user's actual enabled/disabled toggles.

Symptom: disabling a provider with codexbar config disable --provider codex correctly drops it from codexbar usage, but the indicator keeps showing it (and shows Codex+Claude even when neither is enabled).

Fix

Resolve the config path preferring the new XDG location (~/.config/codexbar/config.json) and falling back to the legacy ~/.codexbar/config.json, matching what the codexbar CLI itself does. README config-path reference updated to mention both.

Testing

  • python3 -c "import ast; ast.parse(...)" — syntax OK
  • pyflakes — clean (matches the linux-indicator.yml CI lint)
  • Verified on Ubuntu 22.04 / GNOME 42 (X11): after the fix, disabling codex via the CLI makes the indicator label go from Ox$0 Cl55/92 to Cl55/92 on restart.

The GNOME/Ubuntu indicator only looked at the legacy
~/.codexbar/config.json path. New CodexBar installs write to
~/.config/codexbar/config.json, so on those installs the file was
absent and load_enabled_providers() silently fell back to the
hardcoded [codex, claude] default -- ignoring the user's actual
enabled/disabled provider toggles.

Resolve the config path preferring the new XDG location and falling
back to the legacy one, matching what the codexbar CLI itself does.
@SebastienBreton

Copy link
Copy Markdown
Owner

Seems very good to me

@SebastienBreton

Copy link
Copy Markdown
Owner

Almost too good actually

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.

2 participants