49 lines
1.3 KiB
Bash
Executable file
49 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# Path to your dotfiles.
|
|
export DOTFILES=$HOME/.dotfiles
|
|
|
|
echo "Setting up your system..."
|
|
echo "Your dotfiles path: $DOTFILES"
|
|
|
|
if [ ! -d $HOME/.znap/znap ]; then
|
|
echo "Installing znap..."
|
|
sh -c "$(git clone --depth 1 -- https://github.com/marlonrichert/zsh-snap.git $HOME/.znap/znap)"
|
|
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
|
|
|
|
# git
|
|
# We only include our config here to allow other tools to still modify the gitconfig locally with user specific paths etc.
|
|
# E.g. znap adds maintenance entries there.
|
|
echo """
|
|
|
|
[include]
|
|
path = ~/.dotfiles/.gitconfig
|
|
|
|
""" >> $HOME/.gitconfig
|
|
|
|
# tmux
|
|
rm -rf $HOME/.tmux.conf
|
|
ln -s $DOTFILES/.tmux.conf $HOME/.tmux.conf
|
|
|
|
# nvim
|
|
rm -rf $HOME/.config/nvim
|
|
mkdir -p $HOME/.config
|
|
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!"
|