At this point, I always install / use zsh, so there's no point in keeping this around just for the sake of thinking that maybe somehow I'll do back to bash. If that day comes, I'll port my zshrc back to bash.
86 lines
1.9 KiB
Bash
Executable file
86 lines
1.9 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [ -z "$HOME" ]; then
|
|
echo "Seems you're \$HOMEless :("; exit 1;
|
|
fi
|
|
|
|
DOTCONFIG=$HOME/.config
|
|
DOTFILES=$HOME/.dotfiles
|
|
DOTFZF=$HOME/.fzf
|
|
DOTLOCAL=$HOME/.local/share/dotfiles
|
|
|
|
GITCLONE="git clone --depth=1"
|
|
|
|
cd "$HOME" || exit
|
|
rm -rf "$DOTFILES"
|
|
git clone git@github.com:joshtronic/dotfiles.git "$DOTFILES"
|
|
cd "$DOTFILES" || exit
|
|
|
|
rm -rf \
|
|
"$DOTCONFIG/nvim/init.vim" \
|
|
"$DOTFZF" \
|
|
"$DOTLOCAL" \
|
|
"$HOME/.gitconfig" \
|
|
"$HOME/.screenrc" \
|
|
"$HOME/.vim" \
|
|
"$HOME/.vimrc" \
|
|
"$HOME/.zshrc"
|
|
|
|
mkdir -p \
|
|
"$DOTCONFIG/"{gtk-3.0,nvim} \
|
|
"$DOTLOCAL" \
|
|
"$HOME/.local/share/vim/"{swap,undo} \
|
|
"$HOME/.themes/custom/gnome-shell" \
|
|
"$HOME/.vim/colors" \
|
|
"$HOME/.vim/pack/plugins/start"
|
|
|
|
ln -s "$DOTFILES/gitconfig" "$HOME/.gitconfig"
|
|
ln -s "$DOTFILES/init.vim" "$DOTCONFIG/nvim/init.vim"
|
|
ln -s "$DOTFILES/screenrc" "$HOME/.screenrc"
|
|
ln -s "$DOTFILES/vimrc" "$HOME/.vimrc"
|
|
ln -s "$DOTFILES/zshrc" "$HOME/.zshrc"
|
|
|
|
$GITCLONE https://github.com/junegunn/fzf.git "$DOTFZF"
|
|
"$DOTFZF/install" --key-bindings --completion --no-update-rc
|
|
|
|
ZSHPLUGS=(
|
|
"zsh-completions"
|
|
"zsh-history-substring-search"
|
|
"zsh-syntax-highlighting"
|
|
)
|
|
|
|
for INDEX in ${!ZSHPLUGS[*]}; do
|
|
ZSHPLUG="${ZSHPLUGS[$INDEX]}"
|
|
$GITCLONE "https://github.com/zsh-users/$ZSHPLUG.git" "$DOTLOCAL/$ZSHPLUG"
|
|
done
|
|
|
|
VIMPLUGS=(
|
|
# File exploration and navigation
|
|
"junegunn/fzf.vim"
|
|
|
|
# Languages and syntax
|
|
"sheerun/vim-polyglot"
|
|
|
|
# Style guide and linting
|
|
"dense-analysis/ale"
|
|
"editorconfig/editorconfig-vim"
|
|
|
|
# TypeScript
|
|
"leafgarland/typescript-vim"
|
|
"Quramy/tsuquyomi"
|
|
)
|
|
|
|
for INDEX in ${!VIMPLUGS[*]}; do
|
|
VIMPLUG="${VIMPLUGS[$INDEX]}"
|
|
PLUGDIR=$(echo "$VIMPLUG" | cut -d '/' -f2)
|
|
|
|
$GITCLONE "https://github.com/$VIMPLUG.git" "$HOME/.vim/pack/plugins/start/$PLUGDIR"
|
|
done
|
|
|
|
curl -o "$HOME/.vim/colors/flattened_dark.vim" https://raw.githubusercontent.com/romainl/flattened/master/colors/flattened_dark.vim
|
|
|
|
cd "$HOME" || exit
|
|
rm -f "${HOME}/.zcompdump*"
|
|
|
|
echo
|
|
echo "ENJOY! :)"
|