mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 20:47:47 +00:00
Fix references
This commit is contained in:
@@ -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 omarchy-cmd-present code && [[ ! -f "$VS_CODE_SKIP_FLAG" ]]; then
|
||||||
if [[ -f "$VS_CODE_THEME" ]]; 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")
|
extension=$(jq -r '.extension' "$VS_CODE_THEME")
|
||||||
|
|
||||||
|
# Install VS Code theme extension
|
||||||
if [[ -n "$extension" ]] && ! code --list-extensions | grep -Fxq "$extension"; then
|
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
|
code --install-extension "$extension" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update theme in settings.json
|
# 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"
|
jq -n --arg t "$theme_name" '(input? // {}) | .["workbench.colorTheme"] = $t' "$VS_CODE_SETTINGS" >"${VS_CODE_SETTINGS}.new"
|
||||||
else
|
else
|
||||||
# Remove theme from settings.json when the theme doesn't have vscode support
|
# Remove theme from settings.json when the theme doesn't have vscode support
|
||||||
|
|||||||
Reference in New Issue
Block a user