2024-03-05 11:19:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-03-05 18:47:56 +00:00
|
|
|
# Save current directory
|
|
|
|
ORIGIN_DIR=$(pwd)
|
|
|
|
cd "$HOME" || exit
|
|
|
|
|
2024-03-05 19:34:51 +00:00
|
|
|
# Install git
|
|
|
|
sudo pacman -S git --noconfirm
|
|
|
|
|
2024-03-05 18:47:56 +00:00
|
|
|
# Install yay
|
|
|
|
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
|
|
|
cd /tmp/yay || exit
|
|
|
|
makepkg -si --noconfirm
|
|
|
|
sudo pacman -U yay-*.pkg.tar.zst --noconfirm
|
|
|
|
cd "$OLDPWD" || exit
|
|
|
|
|
2024-03-05 11:19:49 +00:00
|
|
|
# Install the required packages
|
|
|
|
echo -e "\e[32m$1\e[0mInstalling the required packages"
|
2024-06-28 19:45:46 +00:00
|
|
|
yay -S stow gvim neovim zsh fzf bat clang nodejs npm zoxide pfetch ripgrep tree --noconfirm
|
2024-03-05 11:19:49 +00:00
|
|
|
|
|
|
|
# Clone the dotfiles if it's not the current directory
|
|
|
|
if [ "$(pwd)" != "$HOME/.dotfiles" ]; then
|
|
|
|
echo -e "\e[32m$1\e[0mCloning the dotfiles repository"
|
|
|
|
git clone "https://github.com/TiagoRG/.dotfiles.git" "$HOME/.dotfiles"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Setup Vim
|
|
|
|
echo -e "\e[32m$1\e[0mSetting up Vim"
|
|
|
|
echo -e "\e[32m$1\e[0mInstalling OneDark theme"
|
2024-03-05 12:17:36 +00:00
|
|
|
curl -fLo "$HOME/.dotfiles/.vim/colors/onedark.vim" --create-dirs "https://raw.githubusercontent.com/joshdick/onedark.vim/master/colors/onedark.vim"
|
|
|
|
curl -fLo "$HOME/.dotfiles/.vim/autoload/onedark.vim" --create-dirs "https://raw.githubusercontent.com/joshdick/onedark.vim/master/autoload/onedark.vim"
|
2024-03-05 11:19:49 +00:00
|
|
|
echo -e "\e[32m$1\e[0mInstalling Copilot"
|
2024-03-05 12:17:36 +00:00
|
|
|
git clone "https://github.com/github/copilot.vim.git" "$HOME/.dotfiles/.vim/pack/github/start/copilot.vim"
|
2024-03-05 11:19:49 +00:00
|
|
|
echo -e "\e[32m$1\e[0mSetting up Copilot"
|
2024-03-05 18:47:56 +00:00
|
|
|
stow -d .dotfiles .
|
2024-03-05 11:19:49 +00:00
|
|
|
/bin/vim -c 'Copilot setup' -c 'qa!'
|
|
|
|
|
|
|
|
# Setup Neovim
|
|
|
|
echo -e "\e[32m$1\e[0mSetting up Neovim"
|
|
|
|
echo -e "\e[32m$1\e[0mInstalling Packer"
|
|
|
|
git clone --depth 1 "https://github.com/wbthomason/packer.nvim" "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
|
|
|
|
|
|
|
# Setup zsh
|
|
|
|
echo -e "\e[32m$1\e[0mSetting up zsh"
|
|
|
|
chsh -s /bin/zsh
|
|
|
|
echo -e "\e[32m$1\e[0mInstalling zsh-autosuggestions"
|
2024-03-05 12:17:36 +00:00
|
|
|
git clone "https://github.com/zsh-users/zsh-autosuggestions.git" "$HOME/.dotfiles/.zsh/zsh-autosuggestions"
|
2024-03-05 11:19:49 +00:00
|
|
|
echo -e "\e[32m$1\e[0mInstalling zsh-syntax-highlighting"
|
2024-03-05 12:17:36 +00:00
|
|
|
git clone "https://github.com/zsh-users/zsh-syntax-highlighting.git" "$HOME/.dotfiles/.zsh/zsh-syntax-highlighting"
|
2024-03-05 11:19:49 +00:00
|
|
|
|
2024-03-05 18:47:56 +00:00
|
|
|
# Restore the original directory
|
|
|
|
cd "$ORIGIN_DIR" || exit
|
|
|
|
|