Update 2 files

- /home/.chezmoiscripts/universal/run_onchange_after_53-tabby.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_53-tabby.sh.tmpl
This commit is contained in:
Brian Zalewski 2023-04-11 21:44:33 +00:00
parent 781a726ab9
commit 91a9411f55
2 changed files with 63 additions and 20 deletions

View file

@ -0,0 +1,63 @@
{{- if ne .host.distro.family "windows" -}}
#!/usr/bin/env bash
# @file Samba Configuration
# @brief This script installs the default Tabby plugins which are defined in `${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json`
# @description
# This script pre-installs a handful of useful Tabby plugins which are defined in `${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json`.
# These default plugins can be customized by editting the `package.json` file stored in your Install Doctor fork in the Tabby `plugins/package.json`
# file.
#
# ## Default Plugins Configuration
#
# The script will install all the plugins defined in the `package.json` file by navigating to the `~/.config/tabby/plugins` folder
# and then run `npm install`. The default configuration will include the following plugins:
#
# ```json
# <!-- AUTO-GENERATED:START (REMOTE:url=https://gitlab.com/megabyte-labs/install.doctor/-/raw/master/home/dot_config/tabby/plugins/package.json) -->
# {
# ...
# // Notable dependencies listed below
# "dependencies": {
# "tabby-docker": "^0.2.0",
# "tabby-save-output": "^3.1.0",
# "tabby-search-in-browser": "^0.0.1",
# "tabby-workspace-manager": "^0.0.4"
# },
# ...
# }
# <!-- AUTO-GENERATED:END -->
# ```
#
# ## Default Plugin Descriptions
#
# The following chart provides a short description of the default plugins that are pre-installed alongside Tabby:
#
# | NPM Package | Description |
# |---------------------------|---------------------------------------------------------------------|
# | `tabby-docker` | Allows you to shell directly into Docker containers |
# | `tabby-save-output` | This plugin lets you stream console output into a file. |
# | `tabby-search-in-browser` | Allows you to open a internet browser and search for selected text. |
# | `tabby-workspace-manager` | Allows you to create multiple workspace profiles. |
#
# ## Links
#
# * [Tabby plugins `package.json`](https://github.com/megabyte-labs/install.doctor/tree/master/home/dot_config/tabby/plugins/package.json)
# * [Secrets / Environment variables documentation](https://install.doctor/docs/customization/secrets) which details how to store your Tabby configuration in as an encrypted file
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package-lock.json" ]; then
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/node_modules" ]; then
logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since `node_modules` is present in ~/.config/tabby/plugins'
else
logg info 'Installing Tabby plugins defined in `'"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json"'`'
cd "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins"
npm install
logg success 'Finished installing Tabby plugins'
fi
else
logg info 'Skipping Tabby plugin installation because is not present'
fi
{{ end -}}

View file

@ -1,20 +0,0 @@
{{- if ne .host.distro.family "windows" -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package-lock.json" ]; then
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/node_modules" ]; then
logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since `node_modules` is present in ~/.config/tabby/plugins'
else
logg info 'Installing Tabby plugins defined in `'"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json"'`'
cd "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins"
npm install
logg success 'Finished installing Tabby plugins'
fi
else
logg info 'Skipping Tabby plugin installation because is not present'
fi
{{ end -}}