Refine shell panel and lock theming

This commit is contained in:
David Heinemeier Hansson
2026-06-03 22:14:48 +02:00
parent 3cdfb52a74
commit 79470dde92
9 changed files with 203 additions and 33 deletions
+16
View File
@@ -264,6 +264,12 @@ bright-magenta={{ bright_magenta }}
legacy-bright-purple={{ bright_purple }}
EOF
cat >"$NEXT_THEME/shell.lock.toml" <<'EOF'
text = "#ffffff"
placeholder = "#ffffff"
border = "#ffffff"
EOF
OMARCHY_PATH="$ROOT" HOME="$PI_TMPDIR" "$ROOT/bin/omarchy-theme-set-templates"
grep -qx 'mix=#808080' "$NEXT_THEME/mix-test.txt" || fail "theme template mix helper works"
grep -qx 'strip=808080' "$NEXT_THEME/mix-test.txt" || fail "theme template mix_strip helper works"
@@ -291,6 +297,16 @@ grep -qx 'fallback-shell=#336699' "$NEXT_THEME/gradient-test.txt" || fail "theme
grep -qx 'fallback-shell-gradient=#336699' "$NEXT_THEME/gradient-test.txt" || fail "theme template shell_gradient fallback works"
pass "theme template gradient helpers work"
awk '
/^\[lock\]$/ { in_lock = 1; next }
/^\[/ { in_lock = 0 }
in_lock && /^text = "#ffffff"$/ { text = 1 }
in_lock && /^placeholder = "#ffffff"$/ { placeholder = 1 }
in_lock && /^border = "#ffffff"$/ { border = 1 }
END { exit(text && placeholder && border ? 0 : 1) }
' "$NEXT_THEME/shell.toml" || fail "theme shell section override is merged"
pass "theme shell section override is merged"
jq -e '.name == "omarchy-system" and .vars.panel == "#0f0f0f" and .vars.border == "#4d4d4d" and .colors.accent == "accent"' "$NEXT_THEME/pi.json" >/dev/null
pass "pi theme template is generated from standard themed templates"
cp "$NEXT_THEME/pi.json" "$CURRENT_THEME/pi.json"