Follow the active theme in Hunk - #10917
Open
ryankv wants to merge 1 commit into
Open
Conversation
Omarchy installs Hunk as the diff viewer and opens it in every tmux dev square, but it kept GitHub's palette through every theme switch while btop, Helix, Claude Code and the rest retinted. Hunk defines custom themes inline in config.toml and has no theme directory, so writing a palette there would mean rewriting the user's config on every switch. It does load extensions from ~/.config/hunk/extensions without a trust prompt, and an extension can register a theme with the same table Hunk's config accepts. So a generated hunk.json carries the palette the way claude.json and t3code.json do, omarchy-theme-set-hunk publishes it to ~/.config/hunk/themes/omarchy.json on every theme change, and a small extension registers it under the id "omarchy". The only line Omarchy ever writes into config.toml is the theme selection, and only while Hunk is on its default: a theme chosen in Hunk's config stays, and --activate replaces it by name. Hunk rejects a theme whole on any value that is not #rrggbb, and the file is spread into a registration, so the palette is validated before it is published: only Hunk's colour keys, a base id and hex syntax scopes pass, and an unresolved placeholder or a theme's own off-format hunk.json leaves the previous palette in place. The base flips with the theme's mode so light themes inherit GitHub's light defaults for everything unset. Hunk reads its config at startup, so open sessions pick the palette up when relaunched. A migration re-stages the current theme so existing installs follow along at the next update rather than the next switch.
ryankv
commented
Sep 9, 2026
| Omarchy comes with twenty-two beautiful themes. You can select between them via _Style > Theme_ in the Omarchy Menu (`Super + Space`) or hop directly to the theme selector using `Super + Ctrl + Shift + Space`. | ||
|
|
||
| Each theme styles the desktop, terminal, neovim, activity screen (btop), Chromium, and the entire Omarchy shell: top bar, menu, notifications, OSD, and the lock screen. (For Obsidian, you must manually select the Omarchy theme via _Appearance > Themes_ inside the app). | ||
| Each theme styles the desktop, terminal, neovim, activity screen (btop), diff viewer (Hunk), Chromium, and the entire Omarchy shell: top bar, menu, notifications, OSD, and the lock screen. (For Obsidian, you must manually select the Omarchy theme via _Appearance > Themes_ inside the app). |
Author
There was a problem hiding this comment.
it might be unnecessary to include this here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Omarchy installs Hunk as the diff viewer and opens it in every tmux dev square, but it kept GitHub's palette through every theme switch while btop, Helix, Claude Code and the rest retinted.
Hunk defines custom themes inline in
config.tomland has no theme directory, so this follows the Claude Code and T3 Code shape with one twist: a generatedhunk.jsoncarries the palette,omarchy-theme-set-hunkpublishes it to~/.config/hunk/themes/omarchy.jsonon every theme change, and a small extension in~/.config/hunk/extensions/registers it under the idomarchy. Hunk loads user extensions without a trust prompt. The only line Omarchy writes intoconfig.tomlistheme = "omarchy", and only while Hunk is still on its default; a theme chosen in Hunk's config stays, and--activatereplaces it by name.The palette is validated before it is published, since Hunk rejects a theme whole on any value that is not
#rrggbb: only Hunk's colour keys, a base id and hex syntax scopes pass, so an unresolved placeholder or a theme's own off-formathunk.jsonleaves the previous palette in place. The base flips with the theme's mode so light themes inherit GitHub's light defaults for anything unset.Hunk reads its config at startup, so open sessions pick the palette up when relaunched (live reload is open upstream as modem-dev/hunk#486). A migration re-stages the current theme so existing installs follow along at the next update.
Tested by rendering the template for all 22 stock themes and launching Hunk against the dark and light results, which paint the rendered background, panel and diff-row colours exactly.