Only offer Update > Extra Themes when there is one (#7775)
* 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 <noreply@openai.com>
* 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 <noreply@openai.com>
---------
Co-authored-by: Codex XHigh <noreply@openai.com>
(cherry picked from commit 13a969e1ab)
This commit is contained in:
1 parent
1626405638
commit
d0aefc1f79
5 files changed
+107
-6
No files matched your search
@@ -172,6 +172,11 @@ assert(
|
||||
defaultById['update.omarchy'].iconFont === 'omarchy',
|
||||
'menu update Omarchy entry renders the private glyph with the Omarchy font'
|
||||
)
|
||||
assertEqual(
|
||||
defaultById['update.themes'].when,
|
||||
'omarchy-theme-extras',
|
||||
'menu hides Extra Themes until a theme cloned from git is there to update'
|
||||
)
|
||||
assert(
|
||||
defaultById['setup.input'].action.includes('input.lua'),
|
||||
'menu keeps Input as a direct config action'
|
||||
|
||||
Reference in new issue
Block a user