2023-04-29 15:32:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# copying all the needed stuff in place.
|
|
|
|
DOTFILES=${HOME}/.dotfiles
|
|
|
|
|
|
|
|
# copying zshrc file
|
|
|
|
if [[ ! -f "$HOME/.zshrc" ]]; then
|
|
|
|
# no first setup done
|
|
|
|
|
|
|
|
# Determining operating system so we can quickly setup basic configuration
|
2024-04-18 23:44:48 +02:00
|
|
|
if grep -qi 'debian' /proc/version; then
|
2023-04-29 15:32:22 +02:00
|
|
|
# Debian
|
|
|
|
sudo apt install -y zsh-autosuggestions zsh-syntax-highlighting
|
|
|
|
ln -sf ${DOTFILES}/zsh/distro/debian.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
|
|
fi
|
2024-04-18 23:44:48 +02:00
|
|
|
if grep -qi 'ubuntu' /proc/version; then
|
2023-04-29 15:32:22 +02:00
|
|
|
# TODO: complete instructions for Ubuntu
|
|
|
|
ln -sf ${DOTFILES}/zsh/distro/ubuntu.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
|
|
fi
|
2024-04-18 23:44:48 +02:00
|
|
|
if grep -qi 'manjaro' /proc/version; then
|
2023-04-29 15:32:22 +02:00
|
|
|
# TODO: complete instructions for Manjaro
|
|
|
|
pamac install manjaro-zsh-config
|
|
|
|
ln -sf ${DOTFILES}/zsh/distro/manjaro.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
|
|
fi
|
2024-04-18 23:44:48 +02:00
|
|
|
if grep -qi 'archlinux' /proc/version; then
|
2023-04-29 15:32:22 +02:00
|
|
|
pacman -S zsh-autosuggestions zsh-syntax-highlighting
|
|
|
|
ln -sf ${DOTFILES}/zsh/distro/archlinux.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
|
|
fi
|
2024-04-18 23:44:48 +02:00
|
|
|
if grep -qi 'voidlinux' /proc/version; then
|
|
|
|
xbps-install -S zsh
|
|
|
|
ln -sf ${DOTFILES}/zsh/distro/void.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
|
|
fi
|
2023-04-29 15:32:22 +02:00
|
|
|
if [[ -f /etc/redhat-release ]] && grep -qi centos /etc/redhat-release; then
|
|
|
|
# TODO: installation on centos.
|
|
|
|
ln -sf ${DOTFILES}/zsh/distro/centos.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp "${DOTFILES}/zshrc" "$HOME/.zshrc"
|
2024-05-29 02:20:24 +02:00
|
|
|
|
|
|
|
if [[ -f ${DOTFILES}/zsh/antibody_plugins.txt ]]; then
|
|
|
|
# Installing natively on archlinux, manjaro
|
|
|
|
if grep -i archlinux /proc/version || grep -i manjaro /proc/version; then
|
|
|
|
yay -S --no-confirm antibody-bin
|
|
|
|
else
|
|
|
|
curl -sfL git.io/antibody | sudo sh -s - -b /usr/local/bin
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p ~/.zsh/conf.d
|
|
|
|
antibody bundle < ${DOTFILES}/zsh/antibody_plugins.txt > ~/.zsh/conf.d/000_antibody.zsh
|
2023-04-29 15:32:22 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Copying tmux configuration file and initialize plugins.
|
|
|
|
if [[ ! -f "$HOME/.tmux.conf" ]]; then
|
2023-04-29 16:06:57 +02:00
|
|
|
mkdir -p ${HOME}/.config/tmux/plugins
|
|
|
|
git clone https://github.com/tmux-plugins/tpm ${HOME}/.config/tmux/plugins/tpm
|
2023-05-01 01:42:17 +02:00
|
|
|
ln -sf "${DOTFILES}/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
2023-04-29 16:06:57 +02:00
|
|
|
echo "Please, open Tmux and run 'prefix I'."
|
2023-04-29 15:32:22 +02:00
|
|
|
fi
|
2023-04-29 16:36:57 +02:00
|
|
|
|
|
|
|
# Vim - configure vundle and install plugins.
|
|
|
|
if [[ ! -f "${HOME}/.vimrc" ]]; then
|
|
|
|
ln -sf ${DOTFILES}/vimrc ${HOME}/.vimrc
|
|
|
|
ln -sf ${DOTFILES}/vim ${HOME}/.vim
|
2023-05-01 23:58:03 +02:00
|
|
|
# Installing vim-plug
|
|
|
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
# Installing vim-plug and relative plugins
|
|
|
|
vim +PlugInstall +qall
|
2023-04-29 16:36:57 +02:00
|
|
|
fi
|