diff --git a/bin/omarchy-theme-set-vscode b/bin/omarchy-theme-set-vscode index 5ceb3f5..635ea28 100755 --- a/bin/omarchy-theme-set-vscode +++ b/bin/omarchy-theme-set-vscode @@ -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