This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.local/bin/arch_setup

148 lines
3.0 KiB
Bash
Executable File

#!/bin/sh
######################################################################
# @author : swytch
# @file : arch_setup
# @license : MIT
# @created : Wednesday May 20, 2020 17:49:05 CEST
#
# @description : automate the setup of my arch installation
######################################################################
#Lists of apps sorted by type and criticity
base="dash xorg-server xorg-xinit xorg-xinput xorg-xsetroot xclip sxhkd"
base="xss-lock zsh neovim firefox man-db pass"
utilities="xf86-video-intel pulseaudio pulseaudio-alsa alsa-utils \
zsh-syntax-highlighting zsh-history-substring-search pulsemixer \
dunstify libnotify sxiv xwallpaper redshift htop ffmpeg imagemagick \
upower pacman-contrib"
fonts="iosevka-fixed-slab adobe-source-han-sans-jp-fonts adobe-source-han-sans-cn-fonts"
media="mpd ncmpcpp mpv zathura zathura-mupdf"
other="transmission-gtk texlive-core texlive-latexextra capitaine-cursors"
repos="st dwm dmenu slock"
services_list="systemd-timescyncd"
git_clone() {
printf "\nDownloading $1..."
git clone https://gitlab.com/swy7ch/$1 ~/$HOME/.local/src/tools/$1
printf "\tDone."
cd ~/$HOME/.local/src/tools/$1
git remote set-url origin git@gitlab.com:swy7ch/$1
git remote add upstream git://git.suckless.org/$1
printf "\n$1 setup complete!"
cd
}
build() {
cd ~/$1
sudo make clean install
printf "\n$1 compilation complete!"
}
install() {
read -p "\nInstalling $app? [Y/n]" validation
if [ $validation != "n" ]; then
paru -S $app
else
printf "\nSkipping $app"
fi
}
enable_systemctl() {
sudo systemctl enable $1
}
##################################################
############# Let's get things done ##############
##################################################
printf "\nConfiguring Arch...\n"
# Retrieving paru
printf "\nGetting paru..."
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
printf "\nparu is here !"
cd ~
# Installing apps
printf "\nInstalling base..."
for app in $base; do
install $app
done
for app in $utilities; do
install $app
done
for app in $fonts; do
install $app
done
for app in $media; do
install $app
done
for app in $other; do
install $app
done
printf "\nInstalling vim-plug..."
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
printf "\tDone."
printf "\nInstallation complete !\n"
# Symlinking the necessary stuff
printf "\nDownloading personnal git repos..."
for repo in $git; do
git_clone $repo
done
printf "\tDone."
printf "\nCompiling tools..."
for tool in $git; do
build $tool
done
printf "\tDone."
printf "\n"
printf "\n!!! Don't forget to link an SSH key to your account !!!"
printf "\n!!! As of now, you can't pull nor push anything !!!"
printf "\n"
printf "\nEnabling systemctl services..."
for service in $services_list; do
enable_systemctl $service
done
printf "\tDone."
printf "\n"
printf "\n##################################################"
printf "\n"
printf "\nConfiguration complete !\n"