Final tweak. I hope so :)

This commit is contained in:
JaKooLit
2025-02-03 01:28:27 +09:00
parent 8995c47902
commit d3f0016158
16 changed files with 35 additions and 37 deletions

View File

@@ -111,7 +111,7 @@ fi
# Installation of main components
printf "\n%s - Installing hyprland packages.... \n" "${NOTE}"
printf "\n%s - Installing ${BLUE}KooL's hyprland necessary packages${RESET} .... \n" "${NOTE}"
for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do
install_package "$PKG1" "$LOG"

View File

@@ -25,24 +25,23 @@ if [ ! -d Install-Logs ]; then
mkdir Install-Logs
fi
# Function that would show a progress bar to the user on one line
# Function that would show a progress bar
show_progress() {
local pid=$1
local package_name=$2
local dots=""
# Print initial message only once
echo -n "${NOTE} Installing ${YELLOW}$package_name${RESET} ..."
echo -ne "${NOTE} Installing ${YELLOW}$package_name${RESET} ..."
# Loop until the process is running
while ps -p $pid &> /dev/null; do
dots+="."
echo -ne "\r${NOTE} Installing ${YELLOW}$package_name${RESET} ...$dots" # Update the same line with dots
printf "\r%-80s" "${NOTE} Installing ${YELLOW}$package_name${RESET} ...$dots"
sleep 1
done
# After the process finishes, show "Done!" on the same line
echo -ne "\r${NOTE} Installing ${YELLOW}$package_name${RESET} ...$dots Done!" # Replace dots with Done!
printf "\r%-80s\n" "${NOTE} Installing ${YELLOW}$package_name${RESET} ... Done!"
}
@@ -57,7 +56,7 @@ install_package_pacman() {
stdbuf -oL sudo pacman -S --noconfirm --needed "$1" 2>&1
) >> "$LOG" 2>&1 &
PID=$!
show_progress $PID "$1" # Show progress bar while the process runs
show_progress $PID "$1"
# Double check if package is installed
if pacman -Q "$1" &>/dev/null ; then
@@ -82,7 +81,7 @@ install_package() {
stdbuf -oL $ISAUR -S --noconfirm --needed "$1" 2>&1
) >> "$LOG" 2>&1 &
PID=$!
show_progress $PID "$1" # Show progress bar while the process runs
show_progress $PID "$1"
# Double check if package is installed
if $ISAUR -Q "$1" &>> /dev/null ; then
@@ -111,8 +110,6 @@ uninstall_package() {
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall. Please check the log."
return 1
fi
else
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
fi
return 0
}

View File

@@ -21,7 +21,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
while true; do
echo "${WARN} This script will add your ${YELLOW}user${RESET} to the ${MAGENTA}input${RESET} group."
echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for waybar keyboard-state functionality."
echo "${NOTE} Please note that adding yourself to the ${MAGENTA}input${RESET} group might be necessary for ${MAGENTA}waybar keyboard-state functionality${RESET} ."
printf "\n%.0s" {1..1}

View File

@@ -42,7 +42,7 @@ MLOG="install-$(date +%d-%H%M%S)_ags2.log"
printf "\n%.0s" {1..1}
# Installation of main components
printf "\n%s - Installing AGS Dependencies \n" "${NOTE}"
printf "\n%s - Installing ${BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}"
# Installing ags Dependencies
for PKG1 in "${ags[@]}"; do

View File

@@ -27,7 +27,7 @@ printf "${NOTE} Installing ${BLUE}Bluetooth${RESET} Packages...\n"
install_package "$BLUE" "$LOG"
done
printf " Activating Bluetooth Services...\n"
printf " Activating ${YELLOW}Bluetooth${RESET} Services...\n"
sudo systemctl enable --now bluetooth.service 2>&1 | tee -a "$LOG"
printf "\n%.0s" {1..2}

View File

@@ -7,7 +7,7 @@
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
# Check if Hyprland-Dots exists
printf "${NOTE} Downloading ${BLUE}KooL's Hyprland Dots${RESET}....\n"
printf "${NOTE} Cloning and Installing ${BLUE}KooL's Hyprland Dots${RESET}....\n"
if [ -d Hyprland-Dots ]; then
cd Hyprland-Dots
@@ -22,7 +22,7 @@ else
chmod +x copy.sh
./copy.sh
else
echo -e "$ERROR Can't download Hyprland-Dots"
echo -e "$ERROR Can't download ${YELLOW}KooL's Hyprland-Dots${RESET} . Check your internet connection"
fi
fi

View File

@@ -36,7 +36,7 @@ if [ -d "GTK-themes-icons" ]; then
rm -rf "GTK-themes-icons" 2>&1 | tee -a "$LOG"
fi
echo "$NOTE Cloning GTK themes and Icons repository..." 2>&1 | tee -a "$LOG"
echo "$NOTE Cloning ${BLUE}GTK themes and Icons${RESET} repository..." 2>&1 | tee -a "$LOG"
if git clone --depth 1 https://github.com/JaKooLit/GTK-themes-icons.git ; then
cd GTK-themes-icons
chmod +x auto-extract.sh

View File

@@ -34,7 +34,7 @@ if pacman -Qs hyprland >/dev/null; then
fi
# Hyprland
printf "${NOTE} Installing Hyprland .......\n"
printf "${NOTE} Installing ${BLUE}Hyprland packages${RESET} .......\n"
for HYPR in "${hypr[@]}"; do
install_package "$HYPR" "$LOG"
[ $? -ne 0 ] && {

View File

@@ -60,7 +60,7 @@ printf "\n%.0s" {1..3}
# Additional Nvidia steps
NVEA="/etc/modprobe.d/nvidia.conf"
if [ -f "$NVEA" ]; then
printf "${OK} Seems like nvidia-drm modeset=1 is already added in your system..moving on."
printf "${OK} Seems like ${YELLOW}nvidia-drm modeset=1${RESET} is already added in your system..moving on."
printf "\n"
else
printf "\n"
@@ -71,7 +71,7 @@ fi
# Additional for GRUB users
if [ -f /etc/default/grub ]; then
printf "GRUB bootloader detected\n" 2>&1 | tee -a "$LOG"
printf "${INFO} GRUB bootloader detected\n" 2>&1 | tee -a "$LOG"
# Check if nvidia-drm.modeset=1 is present
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
@@ -91,12 +91,12 @@ if [ -f /etc/default/grub ]; then
printf "GRUB configuration regenerated\n" 2>&1 | tee -a "$LOG"
fi
printf "Additional steps for GRUB completed\n" 2>&1 | tee -a "$LOG"
printf "${OK} Additional steps for GRUB completed\n" 2>&1 | tee -a "$LOG"
fi
# Additional for systemd-boot users
if [ -f /boot/loader/loader.conf ]; then
printf "systemd-boot bootloader detected\n" 2>&1 | tee -a "$LOG"
printf "${INFO} systemd-boot bootloader detected\n" 2>&1 | tee -a "$LOG"
backup_count=$(find /boot/loader/entries/ -type f -name "*.conf.bak" | wc -l)
conf_count=$(find /boot/loader/entries/ -type f -name "*.conf" | wc -l)
@@ -112,9 +112,9 @@ if [ -f /boot/loader/loader.conf ]; then
sudo sed -i "/^options/c${sdopt} nvidia-drm.modeset=1 nvidia_drm.fbdev=1" "$imgconf" 2>&1 | tee -a "$LOG"
done
printf "Additional steps for systemd-boot completed\n" 2>&1 | tee -a "$LOG"
printf "${OK} Additional steps for systemd-boot completed\n" 2>&1 | tee -a "$LOG"
else
printf "systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG"
printf "${NOTE} systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG"
fi
fi
@@ -122,7 +122,7 @@ printf "\n%.0s" {1..2}
# Blacklist nouveau
if [[ -z $blacklist_nouveau ]]; then
read -n1 -rep "${CAT} Would you like to blacklist nouveau? (y/n)" blacklist_nouveau
read -n1 -rep "${CAT} Would you like to ${YELLOW}blacklist nouveau${RESET}? (y/n)" blacklist_nouveau
fi
echo
if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
@@ -142,7 +142,7 @@ if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
fi
fi
else
printf "${NOTE} Skipping nouveau blacklisting..." 2>&1 | tee -a "$LOG"
printf "${NOTE} Skipping ${YELLOW}nouveau blacklisting${RESET} ..." 2>&1 | tee -a "$LOG"
fi
printf "\n%.0s" {1..2}

View File

@@ -40,7 +40,7 @@ if [ -n "$ISAUR" ]; then
printf "\n%s - AUR helper already installed, moving on..\n" "${OK}"
else
printf "\n%s - AUR helper was NOT located\n" "$WARN"
printf "\n%s - Installing ${YELLOW}paru-bin${RESET} from AUR\n" "${NOTE}"
printf "\n%s - Installing ${BLUE}paru-bin${RESET} from AUR\n" "${NOTE}"
git clone https://aur.archlinux.org/paru-bin.git || { printf "%s - Failed to clone ${YELLOW}paru-bin${RESET} from AUR\n" "${ERROR}"; exit 1; }
cd paru-bin || { printf "%s - Failed to enter paru directory\n" "${ERROR}"; exit 1; }
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}paru-bin${RESET} from AUR\n" "${ERROR}"; exit 1; }

View File

@@ -30,7 +30,7 @@ echo -e "${NOTE} Disabling pulseaudio to avoid conflicts..."
systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>&1 | tee -a "$LOG"
# Pipewire
echo -e "${NOTE} Installing Pipewire Packages..."
echo -e "${NOTE} Installing ${BLUE}Pipewire${RESET} Packages..."
for PIPEWIRE in "${pipewire[@]}"; do
install_package "$PIPEWIRE" "$LOG"
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $PIPEWIRE Package installation failed, Please check the installation logs"; exit 1; }

View File

@@ -59,10 +59,10 @@ printf "\n%.0s" {1..2}
valid_input=false
while [ "$valid_input" != true ]; do
if [[ -z $install_sddm_theme ]]; then
read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install additional SDDM themes? (y/n)" install_sddm_theme
read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install ${YELLOW}additional SDDM themes?${RESET} (y/n)" install_sddm_theme
fi
if [[ $install_sddm_theme =~ ^[Yy]$ ]]; then
printf "\n%s - Installing Simple SDDM Theme\n" "${NOTE}"
printf "\n%s - Installing ${BLUE}Simple SDDM Theme${RESET}\n" "${NOTE}"
# Check if /usr/share/sddm/themes/simple-sddm-2 exists and remove if it does
if [ -d "/usr/share/sddm/themes/simple-sddm-2" ]; then

View File

@@ -39,7 +39,7 @@ printf "${NOTE} Installing ${BLUE}Thunar${RESET} Packages...\n\n"
printf "\n%.0s" {1..2}
# confirm if wanted to set as default
read -p "${CAT} Do you want to set Thunar as the default file manager? (y/n): " thunar_default
read -p "${CAT} Do you want to set ${MAGENTA}Thunar${RESET} as the default file manager? (y/n): " thunar_default
if [[ "$thunar_default" == [Yy] ]]; then
xdg-mime default thunar.desktop inode/directory
@@ -58,7 +58,7 @@ for DIR1 in gtk-3.0 Thunar xfce4; do
echo -e "${NOTE} Config for $DIR1 found, no need to copy." 2>&1 | tee -a "$LOG"
else
echo -e "${NOTE} Config for $DIR1 not found, copying from assets." 2>&1 | tee -a "$LOG"
cp -r assets/$DIR1 ~/.config/ && echo "Copy $DIR1 completed!" || echo "Error: Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG"
cp -r assets/$DIR1 ~/.config/ && echo "${OK} Copy $DIR1 completed!" || echo "${ERROR} Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG"
fi
done

View File

@@ -27,6 +27,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
# XDG-DESKTOP-PORTAL-HYPRLAND
printf "${NOTE} Installing ${BLUE}xdg-desktop-portal-hyprland${RESET}\n\n"
for xdgs in "${xdg[@]}"; do
install_package "$xdgs" "$LOG"
if [ $? -ne 0 ]; then

View File

@@ -38,7 +38,7 @@ if [ -n "$ISAUR" ]; then
printf "\n%s - AUR helper already installed, moving on.\n" "${OK}"
else
printf "\n%s - AUR helper was NOT located\n" "$WARN"
printf "\n%s - Installing ${YELLOW}yay${RESET} from AUR\n" "${NOTE}"
printf "\n%s - Installing ${BLUE}yay${RESET} from AUR\n" "${NOTE}"
git clone https://aur.archlinux.org/yay.git || { printf "%s - Failed to clone ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; }
cd yay || { printf "%s - Failed to enter yay directory\n" "${ERROR}"; exit 1; }
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}yay${RESET} from AUR\n" "${ERROR}"; exit 1; }

View File

@@ -29,7 +29,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log"
## Optional Pokemon color scripts
while true; do
if [[ -z $pokemon_choice ]]; then
read -p "${CAT} OPTIONAL - Do you want to add Pokemon color scripts? (y/n): " pokemon_choice
read -p "${CAT} OPTIONAL - Do you want to add ${YELLOW}Pokemon color scripts${RESET}? (y/n): " pokemon_choice
fi
case "$pokemon_choice" in
[Yy]*)
@@ -98,13 +98,13 @@ if command -v zsh >/dev/null; then
cp -r 'assets/.zshrc' ~/
cp -r 'assets/.zprofile' ~/
printf "${NOTE} Changing default shell to zsh...\n"
printf "${NOTE} Changing default shell to ${MAGENTA}zsh${RESET}..."
printf "\n%.0s" {1..2}
while ! chsh -s $(which zsh); do
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
sleep 1
done
printf "${NOTE} Shell changed successfully to zsh.\n" 2>&1 | tee -a "$LOG"
printf "${NOTE} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
fi