opencode icon indicating copy to clipboard operation
opencode copied to clipboard

docs: add theme hot-reloading section with SIGUSR2 signal

Open skylight74 opened this issue 20 hours ago • 1 comments

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.

skylight74 avatar Jan 18 '26 06:01 skylight74