2022-10-27 21:22:57 -07:00
|
|
|
# shellcheck disable=SC1090,SC1091
|
|
|
|
|
2022-11-21 20:25:30 -08:00
|
|
|
# Aliases / Functions / Exports
|
2022-11-22 16:15:36 -08:00
|
|
|
if [ -f "$HOME/.config/shell/exports" ]; then
|
|
|
|
|
2022-11-21 20:25:30 -08:00
|
|
|
if [ -f "$XDG_CONFIG_HOME/shell/exports" ]; then
|
|
|
|
. "$XDG_CONFIG_HOME/shell/exports"
|
2022-10-30 18:27:37 -07:00
|
|
|
fi
|
2022-11-21 20:25:30 -08:00
|
|
|
if [ -f "$XDG_CONFIG_HOME/shell/aliases" ]; then
|
|
|
|
. "$XDG_CONFIG_HOME/shell/aliases"
|
|
|
|
fi
|
|
|
|
if [ -f "$XDG_CONFIG_HOME/shell/functions" ]; then
|
|
|
|
. "$XDG_CONFIG_HOME/shell/functions"
|
2022-10-30 18:27:37 -07:00
|
|
|
fi
|
|
|
|
|
2022-10-29 04:35:57 -07:00
|
|
|
### Bash / ZSH
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
if [ "$BASH_SUPPORT" = 'true' ]; then
|
2022-10-29 04:35:57 -07:00
|
|
|
### OS Detection
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
|
|
. /etc/os-release
|
|
|
|
if [ "$ID" = 'alpine' ]; then
|
|
|
|
OS_ICON=""
|
2022-10-31 13:39:24 -07:00
|
|
|
elif [ "$ID" = 'arch' ]; then
|
2022-10-29 04:35:57 -07:00
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'centos' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'coreos' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'debian' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'deepin' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'elementary' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'endeavour' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'freebsd' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'gentoo' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'kali' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'linuxmint' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'manjaro' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'nixos' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'openbsd' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'opensuse' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'parrot' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'pop_os' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'raspberry_pi' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'redhat' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'fedora' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
elif [ "$ID" = 'ubuntu' ]; then
|
|
|
|
OS_ICON=""
|
|
|
|
else
|
|
|
|
OS_ICON=""
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -d /Applications ] && [ -d /Library ] && [ -d /System ]; then
|
|
|
|
# macOS
|
|
|
|
OS_ICON=""
|
|
|
|
else
|
|
|
|
OS_ICON=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-11-04 22:30:41 -07:00
|
|
|
### ASDF
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
if [ -f "$ASDF_DIR/asdf.sh" ]; then
|
2022-11-21 20:25:30 -08:00
|
|
|
. "$ASDF_DIR/asdf.sh"
|
2022-11-04 22:30:41 -07:00
|
|
|
fi
|
2022-10-29 04:35:57 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
### Colorize
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
alias diff='diff --color=auto'
|
|
|
|
alias ip='ip --color=auto'
|
|
|
|
alias pacman='pacman --color=auto'
|
|
|
|
|
2022-10-30 18:27:37 -07:00
|
|
|
### Aliases (better defaults for simple commands)
|
2022-10-29 04:35:57 -07:00
|
|
|
alias cp='cp -v'
|
|
|
|
alias rm='rm -I'
|
|
|
|
alias mv='mv -iv'
|
|
|
|
alias ln='ln -sriv'
|
|
|
|
alias xclip='xclip -selection c'
|
|
|
|
command -v vim > /dev/null && alias vi='vim'
|
|
|
|
|
2022-11-18 21:51:46 -08:00
|
|
|
### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances)
|
2022-10-29 04:35:57 -07:00
|
|
|
command -v htop > /dev/null && alias top='htop'
|
|
|
|
command -v gotop > /dev/null && alias top='gotop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")'
|
|
|
|
command -v ytop > /dev/null && alias top='ytop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")'
|
|
|
|
command -v btm > /dev/null && alias top='btm $([ "$COLOR_SCHEME" = "light" ] && echo "--color default-light")'
|
|
|
|
# themes for light/dark color-schemes inside ~/.config/bashtop; Press ESC to open the menu and change the theme
|
|
|
|
command -v bashtop > /dev/null && alias top='bashtop'
|
|
|
|
command -v bpytop > /dev/null && alias top='bpytop'
|
2022-11-18 21:51:46 -08:00
|
|
|
command -v glances > /dev/null && alias top='glances'
|
2022-10-29 04:35:57 -07:00
|
|
|
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
### Cargo
|
2022-11-21 20:25:30 -08:00
|
|
|
if [ -f "$CARGO_HOME/env" ]; then
|
|
|
|
. "$CARGO_HOME/env"
|
2022-09-03 09:42:59 -07:00
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### SDKMan
|
2022-11-19 00:42:51 -08:00
|
|
|
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
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
export SDKMAN_DIR="$XDG_DATA_HOME/sdkman"
|
2022-11-19 00:42:51 -08:00
|
|
|
. "$SDKMAN_DIR/bin/sdkman-init.sh"
|
2022-09-30 06:09:35 -07:00
|
|
|
fi
|