mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Cleanup
This commit is contained in:
@@ -25,26 +25,13 @@ elif [[ -d "$CURRENT_THEME_DIR" ]]; then
|
|||||||
fi
|
fi
|
||||||
mkdir -p "$CURRENT_THEME_DIR"
|
mkdir -p "$CURRENT_THEME_DIR"
|
||||||
|
|
||||||
# Copy static assets (excluding templates, if any found in theme dir, though they shouldn't be there)
|
# Copy static configs
|
||||||
# We copy everything from the theme directory first.
|
|
||||||
cp -r "$THEME_PATH/"* "$CURRENT_THEME_DIR/" 2>/dev/null
|
cp -r "$THEME_PATH/"* "$CURRENT_THEME_DIR/" 2>/dev/null
|
||||||
|
|
||||||
# Generate configuration files from templates
|
# Generate configuration files from templates
|
||||||
TEMPLATES_DIR="$THEMES_DIR/templates.d"
|
TEMPLATES_DIR="$THEMES_DIR/templates.d"
|
||||||
COLORS_FILE="$THEME_PATH/colors.toml"
|
COLORS_FILE="$THEME_PATH/colors.toml"
|
||||||
|
omarchy-theme-render "$COLORS_FILE" "$TEMPLATES_DIR" "$CURRENT_THEME_DIR"
|
||||||
if [[ -x "$(command -v omarchy-theme-render)" ]]; then
|
|
||||||
omarchy-theme-render "$COLORS_FILE" "$TEMPLATES_DIR" "$CURRENT_THEME_DIR"
|
|
||||||
else
|
|
||||||
# Fallback to local script if not in PATH (development scenario)
|
|
||||||
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
||||||
if [[ -x "$SCRIPT_DIR/omarchy-theme-render" ]]; then
|
|
||||||
"$SCRIPT_DIR/omarchy-theme-render" "$COLORS_FILE" "$TEMPLATES_DIR" "$CURRENT_THEME_DIR"
|
|
||||||
else
|
|
||||||
echo "Error: omarchy-theme-render not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Change background with theme
|
# Change background with theme
|
||||||
omarchy-theme-bg-next
|
omarchy-theme-bg-next
|
||||||
|
|||||||
Reference in New Issue
Block a user