Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/omarchy-theme-color
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ alias_theme_color() {
local key="$1"
local fallback="$2"

[[ ${THEME_COLORS[$key]} ]] || THEME_COLORS[$key]="${THEME_COLORS[$fallback]}"
if [[ -n $fallback && ! ${THEME_COLORS[$key]} && ${THEME_COLORS[$fallback]} ]]; then
THEME_COLORS[$key]="${THEME_COLORS[$fallback]}"
fi
}

resolve_theme_mode() {
Expand Down
6 changes: 3 additions & 3 deletions bin/omarchy-theme-set-templates
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ resolve_theme_ref() {
local ref="$1"
local fallback="${2:-}"

if [[ -n ${THEME_COLORS[$ref]+_} ]]; then
if [[ -n $ref && -n ${THEME_COLORS[$ref]:-} ]]; then
REPLY="${THEME_COLORS[$ref]}"
elif [[ -n $fallback && -n ${THEME_COLORS[$fallback]+_} ]]; then
elif [[ -n $fallback && -n ${THEME_COLORS[$fallback]:-} ]]; then
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
REPLY="${THEME_COLORS[$fallback]}"
elif [[ -n $fallback ]]; then
REPLY="$fallback"
Expand All @@ -58,7 +58,7 @@ resolve_theme_ref() {

resolve_gradient_color() {
trim "$1"
if [[ -n ${THEME_COLORS[$REPLY]+_} ]]; then
if [[ -n $REPLY && -n ${THEME_COLORS[$REPLY]:-} ]]; then
REPLY="${THEME_COLORS[$REPLY]}"
fi
}
Expand Down