Repository navigation
Only offer Update > Extra Themes when there is one - #7775
Merged
Merged
Conversation
omarchy-theme-update pulls the themes under ~/.config/omarchy/themes that came from a git clone, so on a machine that has never installed one by hand the row opens a terminal that prints nothing and closes. Guard it with the same predicates the command itself applies, since a row that shows over a symlinked theme or a worktree's `.git` file is the same dead end in a narrower shape, and pin the two to each other in the guard test. Co-Authored-By: Codex XHigh <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Conditionally exposes Update > Extra Themes only when an updateable Git-cloned theme exists.
Changes:
- Adds a visibility guard matching theme updater predicates.
- Tests copied, cloned, symlinked, empty, and worktree layouts.
- Adds a menu configuration assertion.
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 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
default/omarchy/omarchy-menu.jsonc |
Adds the Extra Themes visibility guard. |
test/shell.d/menu-guards-test.sh |
Verifies guard/updater agreement across theme layouts. |
test/shell.d/menu-test.sh |
Confirms the menu entry includes a theme guard. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "update.channel": {"icon":"","label":"Channel"}, | ||
| "update.config": {"icon":"","label":"Config","title":"Reset to default"}, | ||
| "update.themes": {"icon":"","label":"Extra Themes","action":"omarchy-launch-floating-terminal-with-presentation omarchy-theme-update"}, | ||
| "update.themes": {"icon":"","label":"Extra Themes","when":"( for theme in $HOME/.config/omarchy/themes/*; do [[ ! -L $theme && -d $theme/.git ]] && exit 0; done; exit 1 )","action":"omarchy-launch-floating-terminal-with-presentation omarchy-theme-update"}, |
The row's `when:` and omarchy-theme-update each carried their own idea of which themes came from a git clone, and the two only matched because a test held them together. Name it once instead: omarchy-theme-extras lists those directories and exits nonzero when there are none, so the row asks exactly the command its action runs. Living in a script also puts the glob out of reach of whatever shopt a login shell left set for the guard batch. Co-Authored-By: Codex XHigh <[email protected]>
dhh
pushed a commit
that referenced
this pull request
Aug 23, 2026
* Only offer Update > Extra Themes when there is one omarchy-theme-update pulls the themes under ~/.config/omarchy/themes that came from a git clone, so on a machine that has never installed one by hand the row opens a terminal that prints nothing and closes. Guard it with the same predicates the command itself applies, since a row that shows over a symlinked theme or a worktree's `.git` file is the same dead end in a narrower shape, and pin the two to each other in the guard test. Co-Authored-By: Codex XHigh <[email protected]> * Extract the Extra Themes guard into omarchy-theme-extras The row's `when:` and omarchy-theme-update each carried their own idea of which themes came from a git clone, and the two only matched because a test held them together. Name it once instead: omarchy-theme-extras lists those directories and exits nonzero when there are none, so the row asks exactly the command its action runs. Living in a script also puts the glob out of reach of whatever shopt a login shell left set for the guard batch. Co-Authored-By: Codex XHigh <[email protected]> --------- Co-authored-by: Codex XHigh <[email protected]> (cherry picked from commit 13a969e)
Closed
nick1udwig
pushed a commit
to nick1udwig/omarchy
that referenced
this pull request
Sep 9, 2026
* Only offer Update > Extra Themes when there is one omarchy-theme-update pulls the themes under ~/.config/omarchy/themes that came from a git clone, so on a machine that has never installed one by hand the row opens a terminal that prints nothing and closes. Guard it with the same predicates the command itself applies, since a row that shows over a symlinked theme or a worktree's `.git` file is the same dead end in a narrower shape, and pin the two to each other in the guard test. Co-Authored-By: Codex XHigh <[email protected]> * Extract the Extra Themes guard into omarchy-theme-extras The row's `when:` and omarchy-theme-update each carried their own idea of which themes came from a git clone, and the two only matched because a test held them together. Name it once instead: omarchy-theme-extras lists those directories and exits nonzero when there are none, so the row asks exactly the command its action runs. Living in a script also puts the glob out of reach of whatever shopt a login shell left set for the guard batch. Co-Authored-By: Codex XHigh <[email protected]> --------- Co-authored-by: Codex XHigh <[email protected]>
This was referenced Oct 3, 2026
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.
Update > Extra Themesrunsomarchy-theme-update, which pulls the themes under~/.config/omarchy/themesthat came from a git clone. On a machine that has never installed a theme by hand — which is most of them — the row opens a terminal that prints nothing and closes again.Which themes those are is now one command.
omarchy-theme-extraslists them and exits nonzero when there are none, the menu row asks it as itswhen:, andomarchy-theme-updatepulls what it lists. So the row appears exactly when there is something to pull, and stays hidden over a theme copied by hand, a symlinked working copy, or a worktree's.gitfile — the shapes the updater has always skipped and the row used to offer anyway.