Fix references

This commit is contained in:
David Heinemeier Hansson
2025-09-17 12:16:41 +02:00
parent d92e13143f
commit 1514c5c633

View File

@@ -6,15 +6,16 @@ VS_CODE_SKIP_FLAG="$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes"
if omarchy-cmd-present code && [[ ! -f "$VS_CODE_SKIP_FLAG" ]]; then
if [[ -f "$VS_CODE_THEME" ]]; then
# Install VS Code theme extension
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
extension=$(jq -r '.extension' "$VS_CODE_THEME")
# Install VS Code theme extension
if [[ -n "$extension" ]] && ! code --list-extensions | grep -Fxq "$extension"; then
notify-send " Installing VS Code theme for $THEME_NAME"
notify-send " Installing VS Code theme for $theme_name"
code --install-extension "$extension" >/dev/null
fi
# Update theme in settings.json
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
jq -n --arg t "$theme_name" '(input? // {}) | .["workbench.colorTheme"] = $t' "$VS_CODE_SETTINGS" >"${VS_CODE_SETTINGS}.new"
else
# Remove theme from settings.json when the theme doesn't have vscode support