There are still some other things you see on final test :) BUT, Im quite ok with this

This commit is contained in:
JaKooLit
2025-02-03 12:25:10 +09:00
parent 8c71bdeee7
commit 528551ea86
5 changed files with 22 additions and 15 deletions

View File

@@ -51,8 +51,7 @@ show_progress() {
install_package_pacman() { install_package_pacman() {
# Check if package is already installed # Check if package is already installed
if pacman -Q "$1" &>/dev/null ; then if pacman -Q "$1" &>/dev/null ; then
echo -e "${OK} ${MAGENTA}$1${RESET} is already installed. Skipping..." echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
printf "\n%.0s" {1..1}
else else
# Run pacman and redirect all output to a log file # Run pacman and redirect all output to a log file
( (
@@ -77,7 +76,7 @@ ISAUR=$(command -v yay || command -v paru)
install_package() { install_package() {
# Checking if package is already installed # Checking if package is already installed
if $ISAUR -Q "$1" &>> /dev/null ; then if $ISAUR -Q "$1" &>> /dev/null ; then
echo -e "${OK} ${MAGENTA}$1${RESET} is already installed. Skipping..." echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
else else
# Run yay/paru and redirect all output to a log file # Run yay/paru and redirect all output to a log file
( (
@@ -114,7 +113,7 @@ uninstall_package() {
return 1 return 1
fi fi
else else
echo -e "${NOTE} Package $pkg not installed, skipping." echo -e "${INFO} Package $pkg not installed, skipping."
fi fi
return 0 return 0
} }

View File

@@ -27,7 +27,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
# Removing other Hyprland to avoid conflict # Removing other Hyprland to avoid conflict
printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n" printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n"
if pacman -Qs hyprland >/dev/null; then if pacman -Qs hyprland >/dev/null; then
printf "${YELLOW} Hyprland detected. uninstalling to install Hyprland-git...${RESET}\n" printf "${YELLOW} Hyprland detected. attempting to uninstall to install Hyprland from official repo...${RESET}\n"
for hyprnvi in hyprland-git hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do for hyprnvi in hyprland-git hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do
sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true
done done

View File

@@ -53,11 +53,11 @@ else
echo "Nvidia modules added in /etc/mkinitcpio.conf" echo "Nvidia modules added in /etc/mkinitcpio.conf"
fi fi
printf "\n%.0s" {1..2} printf "\n%.0s" {1..1}
printf "${INFO} Rebuilding ${YELLOW}Initramfs${RESET}...\n" 2>&1 | tee -a "$LOG" printf "${INFO} Rebuilding ${YELLOW}Initramfs${RESET}...\n" 2>&1 | tee -a "$LOG"
sudo mkinitcpio -P 2>&1 | tee -a "$LOG" sudo mkinitcpio -P 2>&1 | tee -a "$LOG"
printf "\n%.0s" {1..2} printf "\n%.0s" {1..1}
# Additional Nvidia steps # Additional Nvidia steps
NVEA="/etc/modprobe.d/nvidia.conf" NVEA="/etc/modprobe.d/nvidia.conf"
@@ -120,7 +120,7 @@ if [ -f /boot/loader/loader.conf ]; then
fi fi
fi fi
printf "\n%.0s" {1..2} printf "\n%.0s" {1..1}
# Blacklist nouveau # Blacklist nouveau
if [[ -z $blacklist_nouveau ]]; then if [[ -z $blacklist_nouveau ]]; then

View File

@@ -71,9 +71,9 @@ printf "\n%.0s" {1..1}
for DIR1 in gtk-3.0 Thunar xfce4; do for DIR1 in gtk-3.0 Thunar xfce4; do
DIRPATH=~/.config/$DIR1 DIRPATH=~/.config/$DIR1
if [ -d "$DIRPATH" ]; then if [ -d "$DIRPATH" ]; then
echo -e "${NOTE} Config for $DIR1 found, no need to copy." 2>&1 | tee -a "$LOG" echo -e "${NOTE} Config for ${MAGENTA}$DIR1${RESET} found, no need to copy." 2>&1 | tee -a "$LOG"
else else
echo -e "${NOTE} Config for $DIR1 not found, copying from assets." 2>&1 | tee -a "$LOG" echo -e "${NOTE} Config for ${YELLOW}$DIR1${RESET} not found, copying from assets." 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" cp -r assets/$DIR1 ~/.config/ && echo "${OK} Copy $DIR1 completed!" || echo "${ERROR} Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG"
fi fi
done done

View File

@@ -33,12 +33,9 @@ while true; do
fi fi
case "$pokemon_choice" in case "$pokemon_choice" in
[Yy]*) [Yy]*)
zsh_pkg+=('pokemon-colorscripts-git')
sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' assets/.zshrc >> "$LOG" 2>&1 sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' assets/.zshrc >> "$LOG" 2>&1
# commenting out fastfetch since pokemon was chosen to install
sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' assets/.zshrc >> "$LOG" 2>&1 sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' assets/.zshrc >> "$LOG" 2>&1
break break
;; ;;
[Nn]*) [Nn]*)
@@ -47,11 +44,12 @@ while true; do
;; ;;
*) *)
echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}" echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}"
pokemon_choice=""
;; ;;
esac esac
done done
# Installing zsh packages # Installing core zsh packages
printf "${NOTE} Installing core zsh packages...${RESET}\n" printf "${NOTE} Installing core zsh packages...${RESET}\n"
for ZSH in "${zsh_pkg[@]}"; do for ZSH in "${zsh_pkg[@]}"; do
( (
@@ -63,6 +61,16 @@ for ZSH in "${zsh_pkg[@]}"; do
done done
wait wait
# Install the Pokemon color scripts if the user accepted earlier
if [[ "$pokemon_choice" =~ [Yy] ]]; then
echo "${NOTE} Installing ${SKY_BLUE}Pokemon color scripts${RESET} ..."
install_package 'pokemon-colorscripts-git' "$LOG"
if [ $? -ne 0 ]; then
echo "${ERROR} Failed to install ${YELLOW}Pokemon color scripts${RESET} . Please check the log." | tee -a "$LOG"
exit 1
fi
fi
# Install Oh My Zsh, plugins, and set zsh as default shell # Install Oh My Zsh, plugins, and set zsh as default shell
if command -v zsh >/dev/null; then if command -v zsh >/dev/null; then
printf "${NOTE} Installing Oh My Zsh and plugins...\n" printf "${NOTE} Installing Oh My Zsh and plugins...\n"