Skip to content

Conversation

@skylight74
Copy link

Summary

Adds documentation for the undocumented theme hot-reloading feature using the SIGUSR2 signal.

This is useful for users who:

  • Use dynamic theming tools like wallust or pywal
  • Want to integrate OpenCode with wallpaper-based color schemes
  • Need to test custom theme changes in real-time without restarting

Changes

  • Added new "Theme hot-reloading" section to themes.mdx
  • Documented the SIGUSR2 signal behavior
  • Added example integration with wallust

How I verified it works

Discovered this feature by reading the source code in packages/opencode/src/cli/cmd/tui/context/theme.tsx which contains:

process.on("SIGUSR2", async () => {
  renderer.clearPaletteCache()
  init()
})

Tested by sending pkill -USR2 -x opencode after modifying theme files - themes reload correctly.

Copilot AI review requested due to automatic review settings January 18, 2026 06:38
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #4879: feat: add theme hot-reload functionality
#4879

Reason for concern: This PR appears to implement the actual theme hot-reload feature that PR #9208 is documenting. The current PR (#9208) is adding documentation for a feature that was implemented in PR #4879. You may want to check if:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the previously undocumented theme hot-reloading feature that allows users to reload themes without restarting OpenCode by sending a SIGUSR2 signal to the process.

Changes:

  • Added a new "Theme hot-reloading" section to the themes documentation
  • Documented the SIGUSR2 signal behavior and its effects on theme reloading
  • Provided practical integration examples with dynamic theming tools like wallust

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skylight74 skylight74 force-pushed the docs-theme-hot-reload branch from 713fa63 to 539e7ae Compare January 18, 2026 06:44
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