2020-05-20 18:34:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
######################################################################
|
2020-05-23 15:47:21 +02:00
|
|
|
# @author : swytch
|
|
|
|
# @file : arch_setup
|
2020-06-25 18:19:40 +02:00
|
|
|
# @license : MIT
|
2020-05-23 15:47:21 +02:00
|
|
|
# @created : Wednesday May 20, 2020 17:49:05 CEST
|
2020-05-20 18:34:34 +02:00
|
|
|
#
|
2020-05-23 15:47:21 +02:00
|
|
|
# @description : automate the setup of my arch installation
|
2020-05-20 18:34:34 +02:00
|
|
|
######################################################################
|
|
|
|
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
#Lists of apps sorted by type and criticity
|
2020-05-20 04:29:02 +02:00
|
|
|
base_list="dash xorg-server xorg-xinit xorg-xinput xsetroot sxhkd xss-lock zsh neovim gtk2 brave"
|
2020-05-06 03:20:19 +02:00
|
|
|
utilities_list="xf86-video-intel pulseaudio pulseaudio-alsa pamixer xprop zsh-syntax-highlighting zsh-history-substring-search dunst dunstify libnotify sxiv xwallpaper redshift htop ffmpeg imagemagick upower pacman-contrib"
|
|
|
|
fonts_list="fira adobe-source-han-sans-jp-fonts adobe-source-han-sans-cn"
|
|
|
|
media_list="mpv zathura"
|
|
|
|
other_list="transmission-gtk texlive-core texlive-bin texlive-latexetra"
|
|
|
|
|
2020-05-20 04:29:02 +02:00
|
|
|
git_list="st dwm dmenu slock"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-20 04:29:02 +02:00
|
|
|
build_list="st dwm dmenu slock"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
services_list="netctl-auto@wlp4s0 systemd-timescyncd"
|
|
|
|
|
|
|
|
|
|
|
|
git_clone() {
|
2020-06-25 18:17:42 +02:00
|
|
|
git clone https://gitlab.com/swy7ch/$1 ~/$HOME/.local/src/suckless/$1
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n$1 downloaded!"
|
2020-05-06 03:20:19 +02:00
|
|
|
cd ~/$1
|
|
|
|
git remote set-url origin git@gitlab.com:swy7ch/$1
|
|
|
|
if [ "dotfiles" != $1 ]
|
|
|
|
git remote add upstream git://git.suckless.org/$1
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n$1 setup complete!"
|
2020-05-06 03:20:19 +02:00
|
|
|
fi
|
|
|
|
cd
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ~/$1
|
|
|
|
sudo make clean install
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n$1 compilation complete!"
|
2020-05-06 03:20:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
|
|
|
read -p "Installing $APP? (y/N)" validation
|
|
|
|
if [ $validation = "y" ]; then
|
|
|
|
yay -S $APP
|
|
|
|
else
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nSkipping $APP"
|
2020-05-06 03:20:19 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
enable_systemctl() {
|
|
|
|
sudo systemctl enable $1.service
|
|
|
|
}
|
|
|
|
|
|
|
|
##################################################
|
|
|
|
############# Let's get things done ##############
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nConfiguring Arch..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
# Retrieving yay
|
|
|
|
# We need git
|
|
|
|
|
|
|
|
git clone https://aur.archlinux.org/yay.git
|
|
|
|
cd yay
|
|
|
|
makepkg -si
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nYAY is here !"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
cd ~
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nLet's get the other apps"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
# Installing apps
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstalling base"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for app in $base_list; do
|
|
|
|
install $app
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstalling utilitaries"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for app in $utilities_list; do
|
|
|
|
install $app
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstalling fonts"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for app in $fonts_list; do
|
|
|
|
install $app
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstalling media apps"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for app in $media_list; do
|
|
|
|
install $app
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstalling other apps"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for app in $other_list; do
|
|
|
|
install $app
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstalling vim-plug"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nInstallation complete !"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
# Symlinking the necessary stuff
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDownloading personnal git repos..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for repo in $git_list; do
|
|
|
|
git_clone $repo
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nCompiling tools..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for tool in $build_list; do
|
|
|
|
build $tool
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
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"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nEnabling systemctl services"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for service in $services_list; do
|
|
|
|
enable_systemctl $service
|
|
|
|
done
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n"
|
|
|
|
printf "\n##################################################"
|
|
|
|
printf "\n"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nConfiguration complete !\n"
|