2022-11-27 11:39:23 -08:00
|
|
|
#!/usr/bin/env bash
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
# shellcheck disable=SC1090,SC1091
|
2022-11-21 20:06:11 -08:00
|
|
|
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
# Prefer US English
|
|
|
|
export LANG="en_US"
|
2023-01-05 16:03:11 -08:00
|
|
|
if [[ "$(hostname)" != *'-minimal' ]]; then
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
fi
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
|
|
|
|
# Detect support for advanced terminal features
|
|
|
|
if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then
|
|
|
|
export BASH_SUPPORT=true
|
|
|
|
fi
|
|
|
|
|
2022-12-01 20:53:42 -08:00
|
|
|
### Import Common Settings
|
|
|
|
if [ -f "$HOME/.config/shell/profile.sh" ]; then
|
|
|
|
. "$HOME/.config/shell/profile.sh"
|
|
|
|
fi
|
|
|
|
|
2023-08-02 12:03:05 -07:00
|
|
|
### Ble.sh
|
|
|
|
[[ $- == *i* ]] && source "${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh" --noattach --rcfile "${XDG_DATA_CONFIG:-$HOME/.config}/blesh/bleshrc"
|
|
|
|
|
2023-07-14 22:28:48 -07:00
|
|
|
### /etc/bashrc
|
|
|
|
if [ -f /etc/bashrc ]; then
|
|
|
|
. /etc/bashrc
|
|
|
|
fi
|
|
|
|
|
2023-07-17 15:06:36 -07:00
|
|
|
### Java (asdf)
|
|
|
|
if [ -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ]; then
|
|
|
|
. "$ASDF_DATA_DIR/plugins/java/set-java-home.bash"
|
|
|
|
fi
|
|
|
|
|
2023-02-04 00:26:20 -08:00
|
|
|
### Escape if shell not interactive
|
|
|
|
case $- in
|
|
|
|
*i*) ;;
|
|
|
|
*) return;;
|
|
|
|
esac
|
|
|
|
|
2023-01-12 11:13:58 -08:00
|
|
|
### Fig / LC_ALL
|
|
|
|
if [ "$BASH_SUPPORT" = 'true' ]; then
|
|
|
|
if [ -f "$HOME/.fig/shell/bashrc.pre.bash" ]; then
|
|
|
|
. "$HOME/.fig/shell/bashrc.pre.bash"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
### History
|
|
|
|
export HISTFILE="$XDG_STATE_HOME/bash/history"
|
2023-06-04 20:26:37 -07:00
|
|
|
if [ -d "$HISTFILE" ]; then
|
|
|
|
# Remove history file if it is incorrectly created as a directory
|
|
|
|
rm -rf "$HISTFILE"
|
|
|
|
fi
|
2023-01-12 11:13:58 -08:00
|
|
|
|
|
|
|
### Bash Initialization Hooks
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
if [ "$BASH_SUPPORT" = 'true' ]; then
|
2023-01-12 11:13:58 -08:00
|
|
|
# Prompt (on bash only)
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
if [[ "$(hostname)" != *'-minimal' ]]; then
|
|
|
|
### Styled Terminal
|
2023-07-11 21:32:13 -07:00
|
|
|
export BASH_IT="${XDG_DATA_HOME:-$HOME/.local/share}/bash_it"
|
2023-01-12 10:50:06 -08:00
|
|
|
export BASH_IT_THEME="powerline"
|
2023-07-07 01:29:58 -07:00
|
|
|
if command -v powerline-daemon > /dev/null && [ -f "$BASH_IT/bash_it.sh" ]; then
|
2022-12-06 11:44:59 -08:00
|
|
|
. "$BASH_IT/bash_it.sh"
|
|
|
|
elif command -v oh-my-posh > /dev/null; then
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
# Oh My Posh (See: https://ohmyposh.dev/)
|
2022-11-27 11:38:16 -08:00
|
|
|
eval "$(oh-my-posh init bash --config "$XDG_CONFIG_HOME/oh-my-posh/Betelgeuse.omp.json")"
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
else
|
|
|
|
# Basic styled terminal
|
|
|
|
case "$TERM" in
|
|
|
|
xterm* | rxvt* | Eterm | aterm | kterm | gnome* | alacritty)
|
|
|
|
PS1="\n \[\033[0;34m\]╭─\[\033[0;31m\]\[\033[0;37m\]\[\033[41m\] $OS_ICON \u \[\033[0m\]\[\033[0;31m\]\[\033[44m\]\[\033[0;34m\]\[\033[44m\]\[\033[0;30m\]\[\033[44m\] \w \[\033[0m\]\[\033[0;34m\] \n \[\033[0;34m\]╰ \[\033[1;36m\]\$ \[\033[0m\]"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# Minimal session
|
|
|
|
if command -v oh-my-posh > /dev/null; then
|
2022-11-27 11:39:23 -08:00
|
|
|
eval "$(oh-my-posh init bash --config "$XDG_CONFIG_HOME/oh-my-posh/Betelgeuse-minimal.omp.json")"
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
fi
|
|
|
|
fi
|
2023-01-12 10:50:06 -08:00
|
|
|
|
2023-02-03 23:10:17 -08:00
|
|
|
### Bash Completion (Homebrew)
|
2023-07-17 00:28:38 -07:00
|
|
|
autoload -U +X bashcompinit && bashcompinit
|
2023-02-03 23:10:17 -08:00
|
|
|
if command -v brew > /dev/null; then
|
|
|
|
if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]; then
|
|
|
|
. "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
|
|
|
|
else
|
|
|
|
for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*; do
|
|
|
|
[[ -r "${COMPLETION}" ]] && source "${COMPLETION}"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-06-18 23:25:39 -07:00
|
|
|
### Atuin
|
|
|
|
if command -v atuin > /dev/null; then
|
|
|
|
eval "$(atuin init bash)"
|
|
|
|
fi
|
|
|
|
|
2023-05-14 17:41:51 -07:00
|
|
|
### Cod
|
|
|
|
if command -v cod > /dev/null; then
|
2023-07-06 12:24:58 -07:00
|
|
|
. <(cod init $$ bash)
|
2023-05-14 17:41:51 -07:00
|
|
|
fi
|
|
|
|
|
2023-06-04 00:46:31 -07:00
|
|
|
### Google Cloud SDK
|
|
|
|
if [ -f "${HOMEBREW_PREFIX}/share/google-cloud-sdk/path.bash.inc" ]; then
|
|
|
|
. "$HOMEBREW_PREFIX/share/google-cloud-sdk/path.bash.inc"
|
|
|
|
fi
|
|
|
|
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
### direnv
|
|
|
|
if command -v direnv > /dev/null; then
|
|
|
|
eval "$(direnv hook bash)"
|
|
|
|
fi
|
|
|
|
|
2023-05-31 22:55:48 -07:00
|
|
|
### Emplace
|
|
|
|
if command -v emplace > /dev/null; then
|
2023-07-06 12:24:58 -07:00
|
|
|
. <(emplace init bash)
|
2023-05-31 22:55:48 -07:00
|
|
|
fi
|
|
|
|
|
2023-06-24 00:54:01 -07:00
|
|
|
### iTerm2
|
2023-07-06 12:24:58 -07:00
|
|
|
if [ -f "$HOME/.local/scripts/iterm2.bash" ]; then
|
|
|
|
. "$HOME/.local/scripts/iterm2.bash"
|
2023-06-24 00:54:01 -07:00
|
|
|
fi
|
|
|
|
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
### Fig
|
|
|
|
if [ -f "$HOME/.fig/shell/bashrc.post.bash" ]; then
|
|
|
|
. "$HOME/.fig/shell/bashrc.post.bash"
|
|
|
|
fi
|
|
|
|
|
2023-08-03 00:35:26 -07:00
|
|
|
### Mamba Forge (Faster Conda Drop-In Replacement)
|
|
|
|
# TODO: Add logic for Linux
|
|
|
|
if [ -f /usr/local/Caskroom/mambaforge/base/bin/conda ]; then
|
|
|
|
# >>> conda initialize >>>
|
|
|
|
# !! Contents within this block are managed by 'conda init' !!
|
|
|
|
__conda_setup="$('/usr/local/Caskroom/mambaforge/base/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
eval "$__conda_setup"
|
|
|
|
else
|
|
|
|
if [ -f "/usr/local/Caskroom/mambaforge/base/etc/profile.d/conda.sh" ]; then
|
|
|
|
. "/usr/local/Caskroom/mambaforge/base/etc/profile.d/conda.sh"
|
|
|
|
else
|
|
|
|
export PATH="/usr/local/Caskroom/mambaforge/base/bin:$PATH"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
unset __conda_setup
|
|
|
|
# <<< conda initialize <<<
|
|
|
|
fi
|
|
|
|
|
|
|
|
### Micro-Mamba
|
|
|
|
# Generate command: micromamba shell init -s bash -p "${XDG_DATA_HOME:-$HOME/.local/share}/micromamba"
|
|
|
|
# TODO: Ensure Linux support
|
|
|
|
if [ -f /usr/local/bin/micromamba ]; then
|
|
|
|
# >>> mamba initialize >>>
|
|
|
|
# !! Contents within this block are managed by 'mamba init' !!
|
|
|
|
export MAMBA_EXE='/usr/local/bin/micromamba';
|
|
|
|
export MAMBA_ROOT_PREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/micromamba";
|
|
|
|
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
eval "$__mamba_setup"
|
|
|
|
else
|
|
|
|
alias micromamba="$MAMBA_EXE" # Fallback on help from mamba activate
|
|
|
|
fi
|
|
|
|
unset __mamba_setup
|
|
|
|
# <<< mamba initialize <<<
|
|
|
|
fi
|
|
|
|
|
2023-06-04 23:34:59 -07:00
|
|
|
### Navi (Ctrl+G)
|
|
|
|
if command -v navi > /dev/null; then
|
|
|
|
eval "$(navi widget bash)"
|
|
|
|
fi
|
|
|
|
|
2023-08-01 20:04:10 -07:00
|
|
|
### SDKMan
|
|
|
|
if command -v brew > /dev/null && command -v sdkman-cli > /dev/null; then
|
|
|
|
export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec"
|
|
|
|
. "$SDKMAN_DIR/bin/sdkman-init.sh"
|
|
|
|
elif [ -f "$SDKMAN_DIR/bin/sdkman-init.sh" ]; then
|
|
|
|
export SDKMAN_DIR="$XDG_DATA_HOME/sdkman"
|
|
|
|
. "$SDKMAN_DIR/bin/sdkman-init.sh"
|
|
|
|
fi
|
|
|
|
|
2023-05-14 18:42:09 -07:00
|
|
|
### The Fuck
|
|
|
|
if command -v thefuck > /dev/null; then
|
|
|
|
eval "$(thefuck --alias)"
|
|
|
|
fi
|
|
|
|
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
### Vault
|
|
|
|
if command -v vault > /dev/null; then
|
|
|
|
complete -C vault vault
|
|
|
|
fi
|
2023-01-12 10:50:06 -08:00
|
|
|
|
|
|
|
### zoxide
|
|
|
|
if command -v zoxide > /dev/null; then
|
2023-07-17 00:28:38 -07:00
|
|
|
eval "$(zoxide init --cmd cd bash)" > /dev/null
|
2023-01-12 10:50:06 -08:00
|
|
|
fi
|
2023-08-02 12:03:05 -07:00
|
|
|
|
|
|
|
### Ble.sh
|
|
|
|
[[ ${BLE_VERSION-} ]] && ble-attach
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
fi
|