Skip to content

Sync Omarchy theme to Opencode - #11402

Open
p134c0d3 wants to merge 1 commit into
omacom:quattrofrom
p134c0d3:opencode-theme-sync
Open

Sync Omarchy theme to Opencode#11402
p134c0d3 wants to merge 1 commit into
omacom:quattrofrom
p134c0d3:opencode-theme-sync

Conversation

@p134c0d3

@p134c0d3 p134c0d3 commented Sep 12, 2026

Copy link
Copy Markdown

Generates an Opencode file theme from colors.toml on every theme switch and syncs it to ~/.config/opencode/themes/omarchy.json, so Opencode follows the Omarchy theme. Open sessions retint live via SIGUSR2 without a restart. Opt in once with omarchy-theme-set-opencode --activate (mirrors the claude/pi sync scripts).

Reloads target interactive TUIs only: the background service (opencode serve --service) does not handle SIGUSR2, so the previous killall -SIGUSR2 opencode killed the service on every theme switch instead of refreshing. Both the new sync script and omarchy-restart-opencode now skip service processes.

Notes:

  • The template uses the file theme format (same shape as the built-in themes and .opencode/themes/mytheme.json upstream). The newer version-2 documented format with partial keys did not apply on 0.0.0-beta-19500 in testing (theme silently falls back to built-in), so this ships the complete key set that was verified to load and live-refresh.
  • Verified end to end on beta-19500: template renders with zero placeholders left (including palettes missing derived keys like orange), sync + activation preserve unrelated cli.json settings, and a running TUI switched Mandalorian -> Tokyo Night -> Mandalorian purely via file sync + SIGUSR2 (confirmed by reading the TUI's emitted truecolor sequences).
  • Tests: new theme template/sync/activation coverage in ./test/cli (10 assertions) plus test/shell.d/opencode-refresh-test.sh for the TUI-only signaling of both scripts. Full ./test/cli passes (126 ok); ./test/shell shows only the pre-existing environmental failures (missing omarchy-pkgs checkout, non-executable snapper test).

Screenshots of the running TUI under each theme to follow (attached via web UI).
shot-tokyonight
shot-mandalorian

Generate an Opencode file theme from colors.toml on every theme switch and sync it to ~/.config/opencode/themes/omarchy.json, refreshing open TUIs live via SIGUSR2. Opt in once with omarchy-theme-set-opencode --activate.

Reloads target interactive TUIs only: the background service (opencode serve --service) does not handle SIGUSR2, so signaling it would kill the service instead of refreshing the theme.
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.

1 participant