diff --git a/bootstrap.sh b/bootstrap.sh index e11a07f..15b1592 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,44 +1,60 @@ #!/bin/bash -ln -s $PWD/.bashrc $HOME/.bashrc - -# Link .vimrc to home directory -ln -s $PWD/.vimrc $HOME/.vimrc - -# Install vim-plug -curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - -# Source .vimrc -source ~/.vimrc +createDir() { + if [ ! -d "$1" ] ; then + mkdir "$1" + fi +} +# Variables for directories +nvimDir="$HOME/.config/nvim" alacrittyDir="$HOME/.config/alacritty" i3Dir="$HOME/.config/i3" polybarDir="$HOME/.config/polybar" rofiDir="$HOME/.config/rofi" +# Install all configs +if [ "$1" = "-S" ] ; then + +ln -s $PWD/.bashrc $HOME/.bashrc + # Create directories -if [ ! -d "$alacrittyDir" ] ; then - mkdir "$alacrittyDir" -fi -if [ ! -d "$i3Dir" ] ; then - mkdir "$i3Dir" -fi -if [ ! -d "$polybarDir" ] ; then - mkdir "$polybarDir" -fi -if [ ! -d "$rofiDir" ] ; then - mkdir "$rofiDir" -fi +createDir $nvimDir +createDir "$nvimDir/plugged" +createDir $alacrittyDir +createDir $i3Dir +createDir $polybarDir +createDir $rofiDir + +# Link nvim configuration file +ln -s $PWD/nvim/init.vim $HOME/.config/nvim/init.vim + +# Install vim-plug +curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim # Create symlinks ln -s $PWD/i3_config $HOME/.config/i3/config ln -s $PWD/alacritty.yml $HOME/.config/alacritty/alacritty.yml -sudo ln -s $PWD/polybar/pacman-updates-module.sh /usr/bin/count-pacman-updates ln -s $PWD/polybar/config.ini $HOME/.config/polybar/config ln -s $PWD/polybar/launch.sh $HOME/.config/polybar/launch.sh ln -s $PWD/rofi_config.rasi $HOME/.config/rofi/config.rasi ln -s $PWD/picom.conf $HOME/.config/picom.conf -echo "Install vim plugins from with :PlugInstall command." -echo "After that, install completions for youcompleteme plugin by running this command:" -echo "$HOME/.vim/plugged/youcompleteme/install.py --ts-completer --go-completer" +echo "Install neovim plugins with :PlugInstall command inside neovim" + +fi + +# Remove all configs +if [ "$1" = "-R" ] ; then + +cd && rm -rf .bashrc $nvimDir $alacrittyDir $i3Dir $polybarDir $rofiDir && cd - + +fi + +# Install apps I need from Arch repositories +if [ "$1" = "-Sa" ] ; then + +# TODO: read apps from list-of-apps file +# TODO: install apps using pacman + +fi