install.fairie/home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.sh.tmpl
Brian Zalewski ec4f5b8059 Update 55 files
- /home/dot_config/rclone/system/s3-docker.service.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_07-docker-plugins.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_13-post-install-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-timeshift.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-keybase.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-install-aqua-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_15-install-asdf-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_19-gnome-extension-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_19-theme-files.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_20-font.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_21-dconf-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_46_virtualbox.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_50-crontab.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_57-netdata.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_59-connect-tailscale.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_61-plymouth-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_70-misc-bug-fixes.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_06-bin-symlink.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_40-chrome.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_27-tor.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_26-system-vscode-node-modules.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_26-vscode-extensions.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_07-docker-plugins.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_05-log-config.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_04-environment-profile.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_11-symlink-ansible-roles.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-warp.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-timeshift.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-keybase.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-install-aqua-packages.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_15-install-asdf-packages.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_19-gnome-extension-settings.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_19-theme-files.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_20-font.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_21-dconf-settings.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_45-vmware.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_46_virtualbox.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_50-crontab.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_59-connect-tailscale.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_61-plymouth-settings.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_70-misc-bug-fixes.sh.tmpl
2023-04-12 03:26:25 +00:00

66 lines
3.7 KiB
Cheetah

{{- if (ne .host.distro.family "windows") -}}
#!/usr/bin/env bash
# @file run_onchange_after_26-vscode-extensions.tmpl
# @brief Installs all of the Visual Studio Code extensions specified in the [`home/dot_config/Code/User/extensions.json`](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/Code/User/extensions.json) file.
# @description
# This script loops through all the extensions listed in the [`home/dot_config/Code/User/extensions.json`](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/Code/User/extensions.json)
# file. It installs the extensions when either Visual Studio Code or VSCodium is installed. If both are installed, then both will
# have the plugins automatically installed.
#
# The `extensions.json` file is used to house the plugin list so that if you decide to remove this auto-installer script then
# VSCode will retain some functionality from the file. It will show a popover card that recommends installing any plugins in the
# list that are not already installed.
#
# ## Plugin Settings
#
# Most of the plugin settings have been configured and optimized to work properly with the other default settings
# included by Install Doctor. These settings can be found in the [`home/dot_config/Code/User/settings.json` file](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/Code/User/settings.json).
# If you manage to come up with an improvement, please open a pull request so other users can benefit from your work.
#
# ## Default Extensions
#
# The default plugins in the `extensions.json` list are catered mostly towards full-stack web development. The technologies
# that are catered to by the default extensions relate to TypeScript, JavaScript, Go, Python, Rust, and many more technologies.
# Most of the plugins are not language-specific.
#
# ## Links
#
# * [Visual Studio Code settings folder](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/Code/User)
# * [Visual Studio Code `extensions.json`](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/Code/User/extensions.json)
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
# @description Install Visual Studio Code extensions if they are not already installed (by checking the `code --list-extensions` output)
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
# @description Check for the presence of the `codium` command in the `PATH` and install extensions for VSCodium if it is present
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 -}}