[PR #9208] docs: add theme hot-reloading section with SIGUSR2 signal #13027

Open
opened 2026-02-16 18:17:54 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9208

State: open
Merged: No


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.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9208 **State:** open **Merged:** No --- ## 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: ```typescript process.on("SIGUSR2", async () => { renderer.clearPaletteCache() init() }) ``` Tested by sending `pkill -USR2 -x opencode` after modifying theme files - themes reload correctly.
yindo added the pull-request label 2026-02-16 18:17:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13027