0cd37a6183
- /home/dot_var/app/com.visualstudio.code/config/symlink_Code - /home/dot_var/app/com.visualstudio.code/config/private_Code/symlink_User - /home/.chezmoiremove - /home/private_dot_config/private_Code/User/extensions.json - /home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.tmpl - /home/Library/Application Support/VSCodium/symlink_User - /home/Library/Application Support/Code/symlink_User - /software.yml
39 lines
1.4 KiB
Cheetah
39 lines
1.4 KiB
Cheetah
{{- if (eq .host.distro.family "linux") -}}
|
|
#!/usr/bin/env bash
|
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
{{ includeTemplate "universal/logg" }}
|
|
|
|
### Install Visual Studio Code extensions
|
|
if command -v code > /dev/null; then
|
|
EXTENSIONS="$(code --list-extensions)"
|
|
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
|
|
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
|
|
logg info 'Installing Visual Studio Code extension `'"$EXTENSION"'`'
|
|
code --install-extension "$EXTENSION"
|
|
logg success 'Installed `'"$EXTENSION"'`'
|
|
else
|
|
logg info '`'"$EXTENSION"'` already installed'
|
|
fi
|
|
done
|
|
else
|
|
logg warn '`code` executable not available'
|
|
fi
|
|
|
|
### Install VSCodium extensions
|
|
if command -v codium > /dev/null; then
|
|
EXTENSIONS="$(codium --list-extensions)"
|
|
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
|
|
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
|
|
logg info 'Installing VSCodium extension `'"$EXTENSION"'`'
|
|
codium --install-extension "$EXTENSION"
|
|
logg success 'Installed `'"$EXTENSION"'`'
|
|
else
|
|
logg info '`'"$EXTENSION"'` already installed'
|
|
fi
|
|
done
|
|
else
|
|
logg warn '`codium` executable not available'
|
|
fi
|
|
|
|
{{ end -}}
|