install vim plugins in script

This commit is contained in:
Luke Smith 2022-08-02 11:31:59 -04:00
parent a07370f550
commit 315f06ccb3

View File

@ -91,7 +91,7 @@ Server = https://mirror.pascalpuffke.de/artix-universe/\$arch
Server = https://artixlinux.qontinuum.space/artixlinux/universe/os/\$arch
Server = https://mirror1.cl.netactuate.com/artix/universe/\$arch
Server = https://ftp.crifo.org/artix-universe/" >>/etc/pacman.conf
pacman -Sy
pacman -Sy --noconfirm >/dev/null 2>&1
fi
pacman --noconfirm --needed -S \
artix-keyring artix-archlinux-support >/dev/null 2>&1
@ -191,6 +191,15 @@ putgitrepo() {
sudo -u "$name" cp -rfT "$dir" "$2"
}
vimplugininstall() {
# Installs vim plugins.
whiptail --infobox "Installing neovim plugins..." 7 60
mkdir -p "/home/$name/.config/nvim/autoload"
curl -Ls "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > "/home/$name/.config/nvim/autoload/plug.vim"
chown -R "$name:wheel" "/home/$name/.config/nvim"
sudo -u "$name" nvim -c "PlugInstall|q|q"
}
finalize() {
whiptail --title "All done!" \
--msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\\n\\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment (it will start automatically in tty1).\\n\\n.t Luke" 13 80
@ -266,6 +275,9 @@ pacman -Qs libxft-git ||
putgitrepo "$dotfilesrepo" "/home/$name" "$repobranch"
rm -rf "/home/$name/.git/" "/home/$name/README.md" "/home/$name/LICENSE" "/home/$name/FUNDING.yml"
# Install vim plugins if not alread present.
[ ! -f "/home/$name/.config/nvim/autoload/plug.vim" ] && vimplugininstall
# Most important command! Get rid of the beep!
rmmod pcspkr
echo "blacklist pcspkr" >/etc/modprobe.d/nobeep.conf