#!/bin/bash # Manage color themes: local static themes installed under # ~/.config/omarchy/themes/, the pywal-generated dynamic theme # (blob-dynamic), and themes shared from the wall-styles website. THEME_DIR="$HOME/.config/omarchy/themes/blob-dynamic" USER_THEMES_DIR="$HOME/.config/omarchy/themes" CURRENT_DIR="$HOME/.local/state/omarchy/current" # Used only when a bare id is passed instead of a full share link. # Override with: export BLOB_THEME_URL="https://your-deployment.vercel.app" BASE_URL="${BLOB_THEME_URL:-https://wall-styles.vercel.app}" slugify() { echo "$1" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' } prettify() { echo "$1" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g' } current_mode() { local name name=$(cat "$CURRENT_DIR/theme.name" 2>/dev/null) if [ "$name" = "blob-dynamic" ]; then echo "dynamic" else echo "static" fi } theme_exists_locally() { local slug slug=$(slugify "$1") [ -d "$USER_THEMES_DIR/$slug" ] || [ -d "$OMARCHY_PATH/themes/$slug" ] } # Rows for omarchy-menu-select, as "