2022-04-17 18:39:47 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-04-17 21:14:14 +02:00
|
|
|
# Path to your dotfiles.
|
|
|
|
export DOTFILES=$HOME/.dotfiles
|
2022-04-17 18:39:47 +02:00
|
|
|
|
|
|
|
echo "Setting up your system..."
|
|
|
|
echo "Your dotfiles path: $DOTFILES"
|
|
|
|
|
2023-10-29 17:50:49 +01:00
|
|
|
if [ ! -d $HOME/.znap/znap ]; then
|
2022-04-17 18:39:47 +02:00
|
|
|
echo "Installing znap..."
|
2023-10-29 17:50:49 +01:00
|
|
|
sh -c "$(git clone --depth 1 -- https://github.com/marlonrichert/zsh-snap.git $HOME/.znap/znap)"
|
2022-04-17 18:39:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles
|
|
|
|
rm -rf $HOME/.zshrc
|
|
|
|
ln -s $DOTFILES/zsh/.zshrc $HOME/.zshrc
|
|
|
|
|
|
|
|
# Relink other software configs
|
|
|
|
# tmux
|
|
|
|
rm -rf $HOME/.tmux.conf
|
|
|
|
ln -s $DOTFILES/.tmux.conf $HOME/.tmux.conf
|
|
|
|
|
|
|
|
# nvim
|
|
|
|
rm -rf $HOME/.config/nvim
|
2023-11-03 10:11:29 +01:00
|
|
|
mkdir -p $HOME/.config
|
2022-04-17 18:39:47 +02:00
|
|
|
ln -s $DOTFILES/nvim $HOME/.config/nvim
|
|
|
|
|
|
|
|
# NVIM config:
|
|
|
|
# Install vim-plug for nvim
|
|
|
|
if [ ! -f ~/.config/nvim/autoload/plug.vim ]; then
|
|
|
|
echo "Installing vim-plug for nvim"
|
|
|
|
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install + update all nvim plugins
|
|
|
|
nvim +PlugUpgrade +PlugUpdate +qall
|
|
|
|
|
|
|
|
echo "Done! All set up, ready to be used!"
|