Add omarchy-theme-dir and use it to resolve theme paths
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6aaa5b764e
commit
2996ee6327
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Print the directory holding a theme, preferring a user-installed copy
|
||||
# omarchy:args=<theme-name>
|
||||
# omarchy:examples=omarchy theme dir tokyo-night
|
||||
|
||||
theme="${1:-}"
|
||||
|
||||
if [[ -z $theme ]]; then
|
||||
echo "Usage: omarchy-theme-dir <theme-name>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -d $HOME/.config/omarchy/themes/$theme ]]; then
|
||||
echo "$HOME/.config/omarchy/themes/$theme"
|
||||
else
|
||||
echo "$OMARCHY_PATH/themes/$theme"
|
||||
fi
|
||||
Reference in New Issue
Block a user