2023-02-17 16:11:48 +00:00
|
|
|
#!/bin/bash
|
2023-09-04 19:21:39 +00:00
|
|
|
# ___ _ _ _
|
|
|
|
# |_ _|_ __ ___| |_ __ _| | |
|
|
|
|
# | || '_ \/ __| __/ _` | | |
|
|
|
|
# | || | | \__ \ || (_| | | |
|
|
|
|
# |___|_| |_|___/\__\__,_|_|_|
|
|
|
|
#
|
|
|
|
# by Stephan Raabe (2023)
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Install Script for required packages
|
2023-02-17 16:11:48 +00:00
|
|
|
# ------------------------------------------------------
|
2023-08-17 18:56:53 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Load Library
|
|
|
|
# ------------------------------------------------------
|
|
|
|
source $(dirname "$0")/scripts/library.sh
|
2023-04-12 09:36:57 +00:00
|
|
|
clear
|
2023-09-04 19:21:39 +00:00
|
|
|
echo " ___ _ _ _ "
|
|
|
|
echo " |_ _|_ __ ___| |_ __ _| | | "
|
|
|
|
echo " | || _ \/ __| __/ _ | | | "
|
|
|
|
echo " | || | | \__ \ || (_| | | | "
|
|
|
|
echo " |___|_| |_|___/\__\__,_|_|_| "
|
|
|
|
echo " "
|
2023-04-12 10:27:35 +00:00
|
|
|
echo "by Stephan Raabe (2023)"
|
|
|
|
echo "-------------------------------------"
|
|
|
|
echo ""
|
2023-08-14 08:36:46 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Check if yay is installed
|
|
|
|
# ------------------------------------------------------
|
|
|
|
if sudo pacman -Qs yay > /dev/null ; then
|
2023-08-15 08:02:31 +00:00
|
|
|
echo "yay is installed. You can proceed with the installation"
|
2023-08-14 08:36:46 +00:00
|
|
|
else
|
2023-08-15 08:02:31 +00:00
|
|
|
echo "yay is not installed. Will be installed now!"
|
|
|
|
git clone https://aur.archlinux.org/yay-git.git ~/yay-git
|
|
|
|
cd ~/yay-git
|
|
|
|
makepkg -si
|
2023-08-15 08:06:09 +00:00
|
|
|
cd ~/dotfiles/
|
2023-08-14 08:36:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Confirm Start
|
|
|
|
# ------------------------------------------------------
|
2023-04-12 10:27:35 +00:00
|
|
|
while true; do
|
|
|
|
read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn
|
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
|
|
|
echo "Installation started."
|
|
|
|
break;;
|
|
|
|
[Nn]* )
|
|
|
|
exit;
|
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
2023-02-17 16:11:48 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install required packages
|
|
|
|
# ------------------------------------------------------
|
2023-04-12 09:36:57 +00:00
|
|
|
echo ""
|
2023-02-17 16:11:48 +00:00
|
|
|
echo "-> Install main packages"
|
2023-04-12 09:36:57 +00:00
|
|
|
|
2023-09-04 19:21:39 +00:00
|
|
|
packagesPacman=(
|
|
|
|
"picom"
|
|
|
|
"alacritty"
|
|
|
|
"rofi"
|
|
|
|
"rofi-calc"
|
|
|
|
"chromium"
|
|
|
|
"scrot"
|
|
|
|
"nitrogen"
|
|
|
|
"dunst"
|
|
|
|
"starship"
|
|
|
|
"slock"
|
|
|
|
"neovim"
|
|
|
|
"mpv"
|
|
|
|
"freerdp"
|
|
|
|
"xfce4-power-manager"
|
|
|
|
"thunar"
|
|
|
|
"mousepad"
|
|
|
|
"ttf-font-awesome"
|
|
|
|
"ttf-fira-sans"
|
|
|
|
"ttf-fira-code"
|
|
|
|
"ttf-firacode-nerd"
|
|
|
|
"figlet"
|
|
|
|
"lxappearance"
|
|
|
|
"breeze"
|
|
|
|
"breeze-gtk"
|
|
|
|
"vlc"
|
|
|
|
"exa"
|
|
|
|
"python-pip"
|
|
|
|
"python-psutil"
|
|
|
|
"python-rich"
|
|
|
|
"python-click"
|
|
|
|
"xdg-desktop-portal-gtk"
|
|
|
|
"pavucontrol"
|
|
|
|
"tumbler"
|
|
|
|
"xautolock"
|
|
|
|
"blueman"
|
|
|
|
);
|
2023-04-12 09:36:57 +00:00
|
|
|
|
2023-09-04 19:21:39 +00:00
|
|
|
packagesYay=(
|
|
|
|
"brave-bin"
|
|
|
|
"pfetch"
|
|
|
|
"bibata-cursor-theme"
|
|
|
|
"trizen"
|
|
|
|
);
|
2023-07-28 07:55:22 +00:00
|
|
|
|
2023-02-17 16:11:48 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install required packages
|
|
|
|
# ------------------------------------------------------
|
2023-04-12 09:36:57 +00:00
|
|
|
_installPackagesPacman "${packagesPacman[@]}";
|
|
|
|
_installPackagesYay "${packagesYay[@]}";
|
2023-03-15 09:13:45 +00:00
|
|
|
|
2023-08-19 09:21:42 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install pywal
|
|
|
|
# ------------------------------------------------------
|
2023-04-13 13:18:36 +00:00
|
|
|
if [ -f /usr/bin/wal ]; then
|
|
|
|
echo "pywal already installed."
|
|
|
|
else
|
|
|
|
yay --noconfirm -S pywal
|
|
|
|
fi
|
2023-04-12 13:25:19 +00:00
|
|
|
|
2023-08-28 11:33:53 +00:00
|
|
|
clear
|
|
|
|
|
2023-08-20 09:46:46 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Remove pywal folder from .config
|
|
|
|
# ------------------------------------------------------
|
|
|
|
echo ""
|
|
|
|
if [ -d ~/.config/wal/ ]; then
|
|
|
|
rm -r ~/.config/wal/
|
|
|
|
echo "~/.config/wal/ removed."
|
|
|
|
fi
|
|
|
|
|
2023-04-12 11:33:44 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install .bashrc
|
|
|
|
# ------------------------------------------------------
|
|
|
|
echo ""
|
|
|
|
echo "-> Install .bashrc"
|
|
|
|
while true; do
|
|
|
|
read -p "Do you want to replace the existing .bashrc file? (Yy/Nn): " yn
|
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
|
|
|
rm ~/.bashrc
|
2023-09-04 19:21:39 +00:00
|
|
|
_installSymLink ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
2023-04-12 11:33:44 +00:00
|
|
|
echo ".bashrc removed"
|
|
|
|
break;;
|
|
|
|
[Nn]* )
|
|
|
|
echo "Replacement of .bashrc skipped."
|
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
2023-08-17 18:56:53 +00:00
|
|
|
|
2023-04-10 15:04:46 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install Theme, Icons and Cursor
|
|
|
|
# ------------------------------------------------------
|
2023-04-12 11:33:44 +00:00
|
|
|
echo ""
|
|
|
|
echo "-> Install Theme"
|
|
|
|
while true; do
|
2023-08-19 09:21:42 +00:00
|
|
|
read -p "Do you want to replace the existing GTK2/GTK3 theme configuration? (Yy/Nn): " yn
|
2023-04-12 11:33:44 +00:00
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
2023-04-13 08:11:34 +00:00
|
|
|
if [ -d ~/.config/gtk-3.0 ]; then
|
|
|
|
rm -r ~/.config/gtk-3.0
|
|
|
|
echo "gtk-3.0 removed"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ~/.gtkrc-2.0 ]; then
|
|
|
|
rm ~/.gtkrc-2.0
|
|
|
|
echo ".gtkrc-2.0"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ~/.Xresources ]; then
|
|
|
|
rm ~/.Xresources
|
|
|
|
echo ".Xresources removed"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d ~/.icons ]; then
|
|
|
|
rm -r ~/.icons
|
|
|
|
echo ".icons removed"
|
|
|
|
fi
|
|
|
|
|
|
|
|
_installSymLink ~/.gtkrc-2.0 ~/dotfiles/.gtkrc-2.0 ~/.gtkrc-2.0
|
|
|
|
_installSymLink ~/.config/gtk-3.0 ~/dotfiles/gtk-3.0/ ~/.config/
|
|
|
|
_installSymLink ~/.Xresources ~/dotfiles/.Xresources ~/.Xresources
|
|
|
|
_installSymLink ~/.icons ~/dotfiles/.icons/ ~/
|
|
|
|
|
2023-04-12 11:33:44 +00:00
|
|
|
echo "Existing theme removed"
|
|
|
|
break;;
|
|
|
|
[Nn]* )
|
|
|
|
echo "Replacement of theme skipped."
|
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
2023-02-17 16:11:48 +00:00
|
|
|
|
2023-04-04 09:22:52 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install custom issue (login prompt)
|
|
|
|
# ------------------------------------------------------
|
2023-04-12 09:36:57 +00:00
|
|
|
echo ""
|
|
|
|
echo "-> Install login screen"
|
2023-04-12 10:27:35 +00:00
|
|
|
while true; do
|
|
|
|
read -p "Do you want to install the custom login promt? (Yy/Nn): " yn
|
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
|
|
|
sudo cp ~/dotfiles/issue /etc/issue
|
|
|
|
echo "Login promt installed."
|
|
|
|
break;;
|
|
|
|
[Nn]* )
|
|
|
|
echo "Custom login promt skipped."
|
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
2023-04-04 09:22:52 +00:00
|
|
|
|
2023-04-13 14:41:22 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install wallpapers
|
|
|
|
# ------------------------------------------------------
|
|
|
|
echo ""
|
|
|
|
echo "-> Install wallapers"
|
|
|
|
while true; do
|
|
|
|
read -p "Do you want to clone the wallpapers? (Yy/Nn): " yn
|
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
|
|
|
if [ -d ~/wallpaper/ ]; then
|
|
|
|
echo "wallpaper folder already exists."
|
|
|
|
else
|
|
|
|
git clone https://gitlab.com/stephan-raabe/wallpaper.git ~/wallpaper
|
|
|
|
echo "wallpaper installed."
|
|
|
|
fi
|
|
|
|
echo "Wallpaper installed."
|
|
|
|
break;;
|
|
|
|
[Nn]* )
|
|
|
|
if [ -d ~/wallpaper/ ]; then
|
|
|
|
echo "wallpaper folder already exists."
|
|
|
|
else
|
|
|
|
mkdir ~/wallpaper
|
|
|
|
fi
|
|
|
|
cp ~/dotfiles/default.jpg ~/wallpaper
|
|
|
|
echo "Default wallpaper installed."
|
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Init pywal
|
|
|
|
# ------------------------------------------------------
|
|
|
|
echo ""
|
|
|
|
echo "-> Init pywal"
|
2023-04-13 16:04:04 +00:00
|
|
|
wal -i ~/dotfiles/default.jpg
|
2023-04-13 14:41:22 +00:00
|
|
|
echo "pywal initiated."
|
|
|
|
|
2023-02-17 16:11:48 +00:00
|
|
|
# ------------------------------------------------------
|
2023-04-12 10:27:35 +00:00
|
|
|
# DONE
|
2023-02-17 16:11:48 +00:00
|
|
|
# ------------------------------------------------------
|
2023-04-13 16:04:04 +00:00
|
|
|
clear
|
|
|
|
echo "DONE!"
|