2022-01-05 03:41:41 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-02-19 17:49:25 +00:00
|
|
|
DOTFILES="$(dirname -- "$(readlink -f -- "$0")")"
|
2022-01-05 03:41:41 +00:00
|
|
|
echo "🐚 Installing dotfiles from '$DOTFILES'..."
|
|
|
|
|
2022-02-19 17:49:25 +00:00
|
|
|
mkdir -p ~/.config/wezterm
|
2022-01-05 03:41:41 +00:00
|
|
|
ln -sf "$DOTFILES/ackrc" ~/.ackrc
|
|
|
|
ln -sf "$DOTFILES/gitconfig" ~/.gitconfig
|
|
|
|
ln -sf "$DOTFILES/inputrc" ~/.inputrc
|
2022-02-19 17:49:25 +00:00
|
|
|
ln -sf "$DOTFILES/starship.toml" ~/.config/starship.toml
|
2022-01-05 03:41:41 +00:00
|
|
|
ln -sf "$DOTFILES/tmux.conf" ~/.tmux.conf
|
2022-02-19 17:49:25 +00:00
|
|
|
ln -sf "$DOTFILES/wezterm.lua" ~/.config/wezterm/wezterm.lua
|
2022-01-05 03:41:41 +00:00
|
|
|
ln -sf "$DOTFILES/zshenv" ~/.zshenv
|
|
|
|
ln -sf "$DOTFILES/zshrc" ~/.zshrc
|
|
|
|
|
2022-02-19 17:49:25 +00:00
|
|
|
|
|
|
|
### Vim
|
|
|
|
|
|
|
|
if ! (command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list vim >/dev/null 2>&1); then
|
|
|
|
sudo apt install vim
|
|
|
|
fi
|
2022-01-05 03:41:41 +00:00
|
|
|
|
|
|
|
if [ ! -d ~/.vim ]; then
|
|
|
|
git clone --quiet https://github.com/deuxpi/dotvim.git ~/.vim
|
|
|
|
ln -sf ~/.vim/vimrc ~/.vimrc
|
|
|
|
else
|
|
|
|
git -C ~/.vim pull --quiet
|
|
|
|
fi
|
|
|
|
mkdir -p ~/.config/coc/
|
|
|
|
vim +'PlugInstall --sync' +qa
|
|
|
|
|
2022-02-19 17:49:25 +00:00
|
|
|
|
|
|
|
### Oh My Zsh!
|
|
|
|
|
2022-01-05 03:41:41 +00:00
|
|
|
if [ ! -d ~/.oh-my-zsh ]; then
|
|
|
|
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc
|
|
|
|
fi
|
|
|
|
if [ ! -d ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions ]; then
|
|
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
|
|
|
fi
|
|
|
|
if [ ! -d ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]; then
|
|
|
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
|
|
|
fi
|
|
|
|
mkdir -p ~/.oh-my-zsh/custom/themes
|
|
|
|
ln -sf "$DOTFILES/themes/witchhazelhypercolor.zsh-theme" ~/.oh-my-zsh/custom/themes/witchhazelhypercolor.zsh-theme
|
|
|
|
|
2022-02-19 17:49:25 +00:00
|
|
|
|
|
|
|
### Starship
|
|
|
|
|
2022-01-05 03:41:41 +00:00
|
|
|
if ! [ -x "$(command -v starship)" ]; then
|
|
|
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- -y
|
|
|
|
fi
|
|
|
|
|
2022-02-19 17:49:25 +00:00
|
|
|
|
|
|
|
### Wezterm
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v wezterm)" ]; then
|
|
|
|
curl -LO https://github.com/wez/wezterm/releases/download/20220101-133340-7edc5b5a/WezTerm-20220101-133340-7edc5b5a-Ubuntu18.04.AppImage
|
|
|
|
chmod +x WezTerm-20220101-133340-7edc5b5a-Ubuntu18.04.AppImage
|
|
|
|
mkdir -p ~/.local/bin
|
|
|
|
mv WezTerm-20220101-133340-7edc5b5a-Ubuntu18.04.AppImage ~/.local/bin/wezterm
|
|
|
|
fi
|