From eec15803fc11492bfa31cb1b49ba4446bcdf251c Mon Sep 17 00:00:00 2001 From: Tommy Martin <54511349+tmn73@users.noreply.github.com> Date: Wed, 18 Feb 2026 16:07:49 -0500 Subject: [PATCH] Allow user themes to override individual files from official themes (#4547) Instead of choosing exclusively between the official or user theme directory, copy the official theme first, then overlay any user customizations on top. This allows users to override specific files (e.g. colors, backgrounds, keyboard backlight) without having to duplicate the entire theme. --- bin/omarchy-theme-set | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index 9fe57b5f..29ad774a 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -12,11 +12,7 @@ OMARCHY_THEMES_PATH="$OMARCHY_PATH/themes" THEME_NAME=$(echo "$1" | sed -E 's/<[^>]+>//g' | tr '[:upper:]' '[:lower:]' | tr ' ' '-') -if [[ -d "$USER_THEMES_PATH/$THEME_NAME" ]]; then - THEME_PATH="$USER_THEMES_PATH/$THEME_NAME" -elif [[ -d "$OMARCHY_THEMES_PATH/$THEME_NAME" ]]; then - THEME_PATH="$OMARCHY_THEMES_PATH/$THEME_NAME" -else +if [[ ! -d "$OMARCHY_THEMES_PATH/$THEME_NAME" ]] && [[ ! -d "$USER_THEMES_PATH/$THEME_NAME" ]]; then echo "Theme '$THEME_NAME' does not exist" exit 1 fi @@ -25,8 +21,9 @@ fi rm -rf "$NEXT_THEME_PATH" mkdir -p "$NEXT_THEME_PATH" -# Copy static configs -cp -r "$THEME_PATH/"* "$NEXT_THEME_PATH/" 2>/dev/null +# Copy official theme first, then overlay user customizations on top +cp -r "$OMARCHY_THEMES_PATH/$THEME_NAME/"* "$NEXT_THEME_PATH/" 2>/dev/null +cp -r "$USER_THEMES_PATH/$THEME_NAME/"* "$NEXT_THEME_PATH/" 2>/dev/null # Generate dynamic configs omarchy-theme-set-templates