disable update checks in VS Code on install (#1730)

* Add ssh-agent configuration and enable service on user install

* add migration

* install SSH Agent via service menu

* Delete install/config/all.sh

* Delete migrations/1757524404.sh

* Delete install/config/ssh-agent.sh

* Update envs.conf

* Revert "Delete install/config/all.sh"

This reverts commit 579fb835ad834d4b2a40a034beae6d8c35a87166.

* revert all.sh changes

* disable update checks in VS Code on install

* Delete bin/omarchy-install-ssh-agent

* Update omarchy-menu

revert changes from wrong branch

* add migration script

* Merge back

* Fixup

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Stefan Gründel
2025-10-17 10:42:59 +02:00
committed by GitHub
parent 48feb5d404
commit dcac313bb2
2 changed files with 24 additions and 0 deletions

View File

@@ -18,4 +18,7 @@ cat > ~/.vscode/argv.json << 'EOF'
} }
EOF EOF
# Ensure VSC's own auto-update feature is turned off
printf '{\n "update.mode": "none"\n}\n' > ~/.config/Code/User/settings.json
setsid gtk-launch code setsid gtk-launch code

21
migrations/1758142943.sh Normal file
View File

@@ -0,0 +1,21 @@
echo "Turn off VSCode's own auto-update feature (we rely on pacman)"
# Note: We cannot use `jq` to update settings.json because its JSONC (allows comments),
# which jq doesnt support.
VS_CODE_SETTINGS="$HOME/.config/Code/User/settings.json"
# If VSCode is installed, ensure that the "update.mode" setting is set to "none"
if omarchy-cmd-present code; then
mkdir -p "$(dirname "$VS_CODE_SETTINGS")"
if [[ ! -f "$VS_CODE_SETTINGS" ]]; then
# If settings.json doesn't exist, create it with just the update.mode setting
printf '{\n "update.mode": "none"\n}\n' > "$VS_CODE_SETTINGS"
elif ! grep -q '"update.mode"' "$VS_CODE_SETTINGS"; then
# Insert "update.mode": "none", immediately after the first "{"
# Use sed's first-match range (0,/{/) to only replace the first "{
sed -i --follow-symlinks -E '0,/\{/{s/\{/{\
"update.mode": "none",/}' "$VS_CODE_SETTINGS"
fi
fi