Repository navigation
Map Omarchy light/dark to Grok built-in themes - #6521
Closed
scottjones wants to merge 8 commits into
Closed
scottjones wants to merge 8 commits into
scottjones wants to merge 8 commits into
Conversation
Stock Grok has no custom theme files, so follow mode sets theme=auto with closest-match auto_dark_theme / auto_light_theme and opt-in activate, matching the Pi/Claude theme-set shape.
Match omarchy-theme-set-gnome: call omarchy-theme-color directly. Document that live external retint is theme=auto + OS appearance.
Drop the opt-in follow flag; mirror Pi by writing whenever ~/.grok exists, and call activate from install/user/theme.sh.
Activate once (install or --activate), update mappings while [ui].theme is auto/system, and stop if the user picks a fixed Grok theme.
Mock omarchy-theme-set-grok in user-theme-test and only print the restart guidance when stdout is a TTY.
--activate no-ops (exit 0) if ~/.grok is missing so theme.sh under set -e still links the btop theme. Drop unused mode lookup that could fail hard.
Use tomllib for [ui].theme, expand closest-match dark mappings, and preserve marketplace array-of-tables in the CLI fixture.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in Grok theme synchronization, mapping Omarchy themes to Grok’s automatic light/dark themes while respecting manual choices.
Changes:
- Adds Grok activation and follow-state handling.
- Integrates synchronization into installation and theme switching.
- Adds CLI and installer test coverage.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
bin/omarchy-theme-set-grok |
Implements Grok theme synchronization. |
bin/omarchy-theme-set |
Runs Grok synchronization after theme changes. |
install/user/theme.sh |
Activates Grok following during setup. |
test/cli |
Tests synchronization and opt-out behavior. |
test/shell.d/user-theme-test.sh |
Mocks the installer integration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| chmod +x "$mock_bin/omarchy-theme-set" | ||
|
|
||
| for command in omarchy-theme-set-pi; do | ||
| for command in omarchy-theme-set-pi omarchy-theme-set-grok; do |
Contributor
Author
There was a problem hiding this comment.
Good catch — updated the mocks to record command + args and assert both omarchy-theme-set-pi --activate and omarchy-theme-set-grok --activate on seed and re-run finalize.
Record mock argv for theme-set-pi/grok so the installer test fails if --activate is omitted.
2 of 6 tasks
Contributor
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.
Summary
Grok's live external retint path is
theme = "auto"plus OS light/dark. This maps Omarchy onto Grok's built-ins through that path, without fighting a manual theme choice forever.omarchy-theme-set-grok(hidden), wired intoomarchy-theme-setandinstall/user/theme.sh--activateonce (install does this): settheme=auto, seedauto_dark_theme/auto_light_theme, leave a follow flagtheme=auto)--activateagain$GROK_HOMEmissing), including on--activateso finalize never aborts underset -eAfter one Grok restart into auto mode, Omarchy light↔dark switches retint live. Same-polarity maps (e.g. tokyo-night → tokyonight) update for the next start.
Test plan
./test/cli(no-op before activate, activate without home, activate, preserve marketplace AOT + keys, tokyo-night/nord maps, stop on manual theme with comment, re-activate)./test/shell(user-theme-test mocks grok activate)/theme oscura-midnight, change Omarchy theme → Grok config stays oscura, follow stopsomarchy-theme-set-grok --activateresumes follow~/.grok,theme.sh --activatedoes not fail finalize