There are still some other things you see on final test :) BUT, Im quite ok with this
This commit is contained in:
@@ -51,8 +51,7 @@ show_progress() {
|
||||
install_package_pacman() {
|
||||
# Check if package is already installed
|
||||
if pacman -Q "$1" &>/dev/null ; then
|
||||
echo -e "${OK} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||
printf "\n%.0s" {1..1}
|
||||
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||
else
|
||||
# Run pacman and redirect all output to a log file
|
||||
(
|
||||
@@ -77,7 +76,7 @@ ISAUR=$(command -v yay || command -v paru)
|
||||
install_package() {
|
||||
# Checking if package is already installed
|
||||
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
|
||||
# Run yay/paru and redirect all output to a log file
|
||||
(
|
||||
@@ -114,7 +113,7 @@ uninstall_package() {
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo -e "${NOTE} Package $pkg not installed, skipping."
|
||||
echo -e "${INFO} Package $pkg not installed, skipping."
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
@@ -27,7 +27,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Removing other Hyprland to avoid conflict
|
||||
printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n"
|
||||
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
|
||||
sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true
|
||||
done
|
||||
|
||||
@@ -53,11 +53,11 @@ else
|
||||
echo "Nvidia modules added in /etc/mkinitcpio.conf"
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
printf "\n%.0s" {1..1}
|
||||
printf "${INFO} Rebuilding ${YELLOW}Initramfs${RESET}...\n" 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
|
||||
NVEA="/etc/modprobe.d/nvidia.conf"
|
||||
@@ -120,7 +120,7 @@ if [ -f /boot/loader/loader.conf ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
# Blacklist nouveau
|
||||
if [[ -z $blacklist_nouveau ]]; then
|
||||
|
||||
@@ -71,9 +71,9 @@ printf "\n%.0s" {1..1}
|
||||
for DIR1 in gtk-3.0 Thunar xfce4; do
|
||||
DIRPATH=~/.config/$DIR1
|
||||
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
|
||||
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"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -33,12 +33,9 @@ while true; do
|
||||
fi
|
||||
case "$pokemon_choice" in
|
||||
[Yy]*)
|
||||
zsh_pkg+=('pokemon-colorscripts-git')
|
||||
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
|
||||
|
||||
|
||||
break
|
||||
;;
|
||||
[Nn]*)
|
||||
@@ -47,11 +44,12 @@ while true; do
|
||||
;;
|
||||
*)
|
||||
echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}"
|
||||
pokemon_choice=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Installing zsh packages
|
||||
# Installing core zsh packages
|
||||
printf "${NOTE} Installing core zsh packages...${RESET}\n"
|
||||
for ZSH in "${zsh_pkg[@]}"; do
|
||||
(
|
||||
@@ -63,6 +61,16 @@ for ZSH in "${zsh_pkg[@]}"; do
|
||||
done
|
||||
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
|
||||
if command -v zsh >/dev/null; then
|
||||
printf "${NOTE} Installing Oh My Zsh and plugins...\n"
|
||||
|
||||
Reference in New Issue
Block a user