updated since many conflicts
This commit is contained in:
@@ -14,10 +14,10 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_base.log"
|
||||
|
||||
|
||||
# Installation of main components
|
||||
printf "\n%s - Installing base-devel \n" "${NOTE}"
|
||||
printf "\n%s - Installing ${SKY_BLUE}base-devel${RESET} \n" "${NOTE}"
|
||||
|
||||
for PKG1 in "${base[@]}"; do
|
||||
sudo pacman -S --noconfirm "$PKG1" | tee -a "$LOG"
|
||||
install_package_pacman "$PKG1" "$LOG"
|
||||
done
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -77,6 +77,8 @@ uninstall=(
|
||||
cachyos-hyprland-settings
|
||||
rofi
|
||||
wallust-git
|
||||
rofi-lbonn-wayland
|
||||
rofi-lbonn-wayland-git
|
||||
)
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
@@ -92,15 +94,12 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log"
|
||||
|
||||
# uninstalling conflicting packages
|
||||
# Initialize a variable to track overall errors
|
||||
# conflicting packages removal
|
||||
overall_failed=0
|
||||
|
||||
printf "\n%s - Removing Mako, Dunst, and rofi as they conflict with swaync and rofi-wayland \n" "${NOTE}"
|
||||
printf "\n%s - ${SKY_BLUE}Removing some packages${RESET} as it conflicts with KooL's Hyprland Dots \n" "${NOTE}"
|
||||
for PKG in "${uninstall[@]}"; do
|
||||
uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
# Track if any uninstallation failed
|
||||
overall_failed=1
|
||||
fi
|
||||
done
|
||||
@@ -109,17 +108,13 @@ if [ $overall_failed -ne 0 ]; then
|
||||
echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
# Installation of main components
|
||||
printf "\n%s - Installing hyprland packages.... \n" "${NOTE}"
|
||||
printf "\n%s - Installing ${SKY_BLUE}KooL's hyprland necessary packages${RESET} .... \n" "${NOTE}"
|
||||
|
||||
for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do
|
||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
install_package "$PKG1" "$LOG"
|
||||
done
|
||||
|
||||
clear
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -40,19 +40,19 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/00_CHECK-$(date +%d-%H%M%S)_installed.log"
|
||||
|
||||
printf "\n%s - Final Check if Essential packages were installed \n" "${NOTE}"
|
||||
printf "\n%s - Final Check if all ${SKY_BLUE}Essential packages${RESET} were installed \n" "${NOTE}"
|
||||
# Initialize an empty array to hold missing packages
|
||||
missing=()
|
||||
local_missing=()
|
||||
|
||||
# Function to check if a package is installed using pacman
|
||||
# Function to check if a packages are installed using pacman
|
||||
is_installed_pacman() {
|
||||
pacman -Qi "$1" &>/dev/null
|
||||
}
|
||||
|
||||
# Loop through each package
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Check if the package is installed via pacman
|
||||
# Check if the packages are installed
|
||||
if ! is_installed_pacman "$pkg"; then
|
||||
missing+=("$pkg")
|
||||
fi
|
||||
@@ -67,25 +67,24 @@ done
|
||||
|
||||
# Log missing packages
|
||||
if [ ${#missing[@]} -eq 0 ] && [ ${#local_missing[@]} -eq 0 ]; then
|
||||
echo "${OK} All essential packages are installed." | tee -a "$LOG"
|
||||
echo "${OK} GREAT! It seems All ${YELLOW}essential packages${RESET} are installed." | tee -a "$LOG"
|
||||
else
|
||||
if [ ${#missing[@]} -ne 0 ]; then
|
||||
echo "${WARN} The following packages are not installed and will be logged:"
|
||||
for pkg in "${missing[@]}"; do
|
||||
echo "$pkg"
|
||||
echo "$pkg" >> "$LOG" # Log the missing package to the file
|
||||
echo "${WARNING}$pkg${RESET}"
|
||||
echo "$pkg" >> "$LOG"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ${#local_missing[@]} -ne 0 ]; then
|
||||
echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
|
||||
for pkg1 in "${local_missing[@]}"; do
|
||||
echo "$pkg1 is not installed. Can't find it in /usr/local/bin/"
|
||||
echo "$pkg1" >> "$LOG" # Log the missing local package to the file
|
||||
echo "${WARNING}$pkg1${REST} is not installed. Can't find it in /usr/local/bin/"
|
||||
echo "$pkg1" >> "$LOG"
|
||||
done
|
||||
fi
|
||||
|
||||
# Add a timestamp when the missing packages were logged
|
||||
echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
|
||||
fi
|
||||
|
||||
|
||||
@@ -8,80 +8,108 @@ set -e
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA=$(tput setaf 5)
|
||||
WARNING=$(tput setaf 1)
|
||||
YELLOW=$(tput setaf 3)
|
||||
RESET=$(tput sgr0)
|
||||
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
ORANGE="$(tput setaf 214)"
|
||||
WARNING="$(tput setaf 1)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
GREEN="$(tput setaf 2)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
SKY_BLUE="$(tput setaf 6)"
|
||||
RESET="$(tput sgr0)"
|
||||
|
||||
# Create Directory for Install Logs
|
||||
if [ ! -d Install-Logs ]; then
|
||||
mkdir Install-Logs
|
||||
fi
|
||||
|
||||
# Function for installing packages
|
||||
# Show progress function
|
||||
show_progress() {
|
||||
local pid=$1
|
||||
local package_name=$2
|
||||
local spin_chars=("●○○○○○○○○○" "○●○○○○○○○○" "○○●○○○○○○○" "○○○●○○○○○○" "○○○○●○○○○" \
|
||||
"○○○○○●○○○○" "○○○○○○●○○○" "○○○○○○○●○○" "○○○○○○○○●○" "○○○○○○○○○●")
|
||||
local i=0
|
||||
|
||||
tput civis
|
||||
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} ..." "$package_name"
|
||||
|
||||
while ps -p $pid &> /dev/null; do
|
||||
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} %s" "$package_name" "${spin_chars[i]}"
|
||||
i=$(( (i + 1) % 10 ))
|
||||
sleep 0.3
|
||||
done
|
||||
|
||||
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} ... Done!%-20s \n" "$package_name" ""
|
||||
tput cnorm
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Function to install packages with pacman
|
||||
install_package_pacman() {
|
||||
# Checking if package is already installed
|
||||
# Check if package is already installed
|
||||
if pacman -Q "$1" &>/dev/null ; then
|
||||
echo -e "${OK} $1 is already installed. Skipping..."
|
||||
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||
else
|
||||
# Package not installed
|
||||
echo -e "${NOTE} Installing $1 ..."
|
||||
sudo pacman -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
|
||||
# Making sure package is installed
|
||||
# Run pacman and redirect all output to a log file
|
||||
(
|
||||
stdbuf -oL sudo pacman -S --noconfirm "$1" 2>&1
|
||||
) >> "$LOG" 2>&1 &
|
||||
PID=$!
|
||||
show_progress $PID "$1"
|
||||
|
||||
# Double check if package is installed
|
||||
if pacman -Q "$1" &>/dev/null ; then
|
||||
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||
else
|
||||
# Something is missing, exiting to review log
|
||||
echo -e "${ERROR} $1 failed to install. Please check the $LOG. You may need to install manually."
|
||||
exit 1
|
||||
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the $LOG. You may need to install manually."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
# Function for installing packages
|
||||
# Function to install packages with either yay or paru
|
||||
install_package() {
|
||||
# Checking if package is already installed
|
||||
if $ISAUR -Q "$1" &>> /dev/null ; then
|
||||
echo -e "${OK} $1 is already installed. Skipping..."
|
||||
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||
else
|
||||
# Package not installed
|
||||
echo -e "${NOTE} Installing $1 ..."
|
||||
$ISAUR -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
|
||||
# Making sure package is installed
|
||||
(
|
||||
stdbuf -oL $ISAUR -S --noconfirm "$1" 2>&1
|
||||
) >> "$LOG" 2>&1 &
|
||||
PID=$!
|
||||
show_progress $PID "$1"
|
||||
|
||||
# Double check if package is installed
|
||||
if $ISAUR -Q "$1" &>> /dev/null ; then
|
||||
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||
else
|
||||
# Something is missing, exiting to review log
|
||||
echo -e "\e[1A\e[K${ERROR} $1 failed to install :( , please check the install.log. You may need to install manually! Sorry I have tried :("
|
||||
exit 1
|
||||
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install :( , please check the install.log. You may need to install manually! Sorry I have tried :("
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Function for uninstalling packages
|
||||
# Function for removing packages
|
||||
uninstall_package() {
|
||||
local pkg="$1"
|
||||
|
||||
# Checking if package is installed
|
||||
if pacman -Qi "$pkg" &>> /dev/null ; then
|
||||
# Package is installed
|
||||
echo -e "${NOTE} Uninstalling $pkg ..."
|
||||
if pacman -Qi "$pkg" &>/dev/null; then
|
||||
echo -e "${NOTE} removing $pkg ..."
|
||||
sudo pacman -R --noconfirm "$pkg" 2>&1 | tee -a "$LOG" | grep -v "error: target not found"
|
||||
# Check if the package was uninstalled
|
||||
if ! pacman -Qi "$pkg" &>> /dev/null ; then
|
||||
echo -e "\e[1A\e[K${OK} $pkg was uninstalled."
|
||||
|
||||
if ! pacman -Qi "$pkg" &>/dev/null; then
|
||||
echo -e "\e[1A\e[K${OK} $pkg removed."
|
||||
else
|
||||
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall. Please check the log."
|
||||
return 1
|
||||
echo -e "\e[1A\e[K${ERROR} $pkg Removal failed. No actions required."
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
|
||||
echo -e "${INFO} Package $pkg not installed, skipping."
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -2,10 +2,6 @@
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Adding users into input group #
|
||||
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
@@ -19,41 +15,17 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
|
||||
|
||||
while true; do
|
||||
echo "${WARN} This script will add your user to the 'input' group."
|
||||
echo "${NOTE} Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality."
|
||||
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
if [[ -z $input_group_choid ]]; then
|
||||
read -p "${YELLOW}Do you want to proceed? (y/n): ${RESET}" input_group_choid
|
||||
fi
|
||||
# Check if the 'input' group exists
|
||||
if grep -q '^input:' /etc/group; then
|
||||
echo "${OK} ${MAGENTA}input${RESET} group exists."
|
||||
else
|
||||
echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..."
|
||||
sudo groupadd input
|
||||
echo "${MAGENTA}input${RESET} group created" >> "$LOG"
|
||||
fi
|
||||
|
||||
if [[ $input_group_choid == "y" || $input_group_choid == "Y" ]]; then
|
||||
# Check if the 'input' group exists
|
||||
if grep -q '^input:' /etc/group; then
|
||||
echo "${OK} 'input' group exists."
|
||||
else
|
||||
echo "${NOTE} 'input' group doesn't exist. Creating 'input' group..."
|
||||
sudo groupadd input
|
||||
# Add the user to the 'input' group
|
||||
sudo usermod -aG input "$(whoami)"
|
||||
echo "${OK} ${YELLOW}user${RESET} added to the ${MAGENTA}input${RESET} group. Changes will take effect after you log out and log back in." >> "$LOG"
|
||||
|
||||
# Log the creation of the 'input' group
|
||||
echo "'input' group created" >> "$LOG"
|
||||
fi
|
||||
|
||||
# Add the user to the input group
|
||||
sudo usermod -aG input "$(whoami)"
|
||||
echo "${OK} User added to the 'input' group. Changes will take effect after you log out and log back in."
|
||||
|
||||
# Log the addition of the user to the 'input' group
|
||||
echo "User added to 'input' group" >> "$LOG"
|
||||
break # Break out of the loop if 'yes' is chosen
|
||||
elif [[ $input_group_choid == "n" || $input_group_choid == "N" ]]; then
|
||||
echo "${NOTE} No changes made. Exiting the script."
|
||||
break # Break out of the loop if 'no' is chosen
|
||||
else
|
||||
echo "${ERROR} Invalid choice. Please enter 'y' for yes or 'n' for no."
|
||||
fi
|
||||
done
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Aylur's GTK Shell v 1.9.0#
|
||||
# Aylur's GTK Shell v 1.9.0 #
|
||||
# for desktop overview
|
||||
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
@@ -39,23 +39,28 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
|
||||
MLOG="install-$(date +%d-%H%M%S)_ags2.log"
|
||||
|
||||
printf "\n%.0s" {1..1}
|
||||
# Check if AGS is installed
|
||||
if command -v ags &>/dev/null; then
|
||||
AGS_VERSION=$(ags -v | awk '{print $NF}')
|
||||
if [[ "$AGS_VERSION" == "1.9.0" ]]; then
|
||||
printf "${INFO} ${MAGENTA}Aylur's GTK Shell v1.9.0${RESET} is already installed. Skipping installation."
|
||||
printf "\n%.0s" {1..2}
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Installation of main components
|
||||
printf "\n%s - Installing AGS Dependencies \n" "${NOTE}"
|
||||
printf "\n%s - Installing ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}"
|
||||
|
||||
# Installing ags Dependencies
|
||||
for PKG1 in "${ags[@]}"; do
|
||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
install_package "$PKG1" "$LOG"
|
||||
done
|
||||
|
||||
printf "\n%.0s" {1..1}
|
||||
# ags
|
||||
printf "${NOTE} Install and Compiling Aylurs GTK shell $ags_tag..\n"
|
||||
|
||||
# ags v1
|
||||
printf "${NOTE} Install and Compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}..\n"
|
||||
|
||||
# Check if folder exists and remove it
|
||||
if [ -d "ags" ]; then
|
||||
@@ -63,24 +68,26 @@ if [ -d "ags" ]; then
|
||||
rm -rf "ags"
|
||||
fi
|
||||
|
||||
# Clone nwg-look repository with the specified tag
|
||||
printf "\n%.0s" {1..1}
|
||||
printf "${INFO} Kindly Standby...cloning and compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}...\n"
|
||||
printf "\n%.0s" {1..1}
|
||||
# Clone repository with the specified tag and capture git output into MLOG
|
||||
if git clone --recursive -b "$ags_tag" --depth 1 https://github.com/Aylur/ags.git; then
|
||||
cd ags || exit 1
|
||||
# Build and install ags
|
||||
npm install
|
||||
meson setup build
|
||||
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
||||
printf "${OK} ags installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||
else
|
||||
echo -e "${ERROR} Installation failed for ags" 2>&1 | tee -a "$MLOG"
|
||||
fi
|
||||
|
||||
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
||||
printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||
else
|
||||
echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG"
|
||||
fi
|
||||
# Move logs to Install-Logs directory
|
||||
mv "$MLOG" ../Install-Logs/ || true
|
||||
cd ..
|
||||
else
|
||||
echo -e "${ERROR} Failed to download ags Please check your connection" 2>&1 | tee -a "$LOG"
|
||||
echo -e "\n${ERROR} Failed to download ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Please check your connection\n" 2>&1 | tee -a "$LOG"
|
||||
mv "$MLOG" ../Install-Logs/ || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -22,13 +22,12 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log"
|
||||
|
||||
# Bluetooth
|
||||
printf "${NOTE} Installing Bluetooth Packages...\n"
|
||||
printf "${NOTE} Installing ${SKY_BLUE}Bluetooth${RESET} Packages...\n"
|
||||
for BLUE in "${blue[@]}"; do
|
||||
install_package "$BLUE" 2>&1 | tee -a "$LOG"
|
||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $BLUE Package installation failed, Please check the installation logs"; exit 1; }
|
||||
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"
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
6
install-scripts/dotfiles-main.sh
Normal file → Executable file
6
install-scripts/dotfiles-main.sh
Normal file → Executable file
@@ -7,7 +7,7 @@
|
||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
|
||||
# Check if Hyprland-Dots exists
|
||||
printf "${NOTE} Downloading KooL's Hyprland Dots....\n"
|
||||
printf "${NOTE} Cloning and Installing ${SKY_BLUE}KooL's Hyprland Dots${RESET}....\n"
|
||||
|
||||
if [ -d Hyprland-Dots ]; then
|
||||
cd Hyprland-Dots
|
||||
@@ -22,8 +22,8 @@ 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
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -32,15 +32,10 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_fonts.log"
|
||||
|
||||
|
||||
# Installation of main components
|
||||
printf "\n%s - Installing necessary fonts.... \n" "${NOTE}"
|
||||
printf "\n%s - Installing necessary ${SKY_BLUE}fonts${RESET}.... \n" "${NOTE}"
|
||||
|
||||
for PKG1 in "${fonts[@]}"; do
|
||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
install_package "$PKG1" "$LOG"
|
||||
done
|
||||
|
||||
clear
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -24,11 +24,7 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log"
|
||||
|
||||
# installing engine needed for gtk themes
|
||||
for PKG1 in "${engine[@]}"; do
|
||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
install_package "$PKG1" "$LOG"
|
||||
done
|
||||
|
||||
# Check if the directory exists and delete it if present
|
||||
@@ -37,7 +33,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 ${SKY_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
|
||||
@@ -48,4 +44,4 @@ else
|
||||
echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -27,20 +27,16 @@ 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
|
||||
fi
|
||||
|
||||
# Hyprland
|
||||
printf "${NOTE} Installing Hyprland .......\n"
|
||||
printf "${NOTE} Installing ${SKY_BLUE}Hyprland packages${RESET} .......\n"
|
||||
for HYPR in "${hypr[@]}"; do
|
||||
install_package "$HYPR" 2>&1 | tee -a "$LOG"
|
||||
[ $? -ne 0 ] && {
|
||||
echo -e "\e[1A\e[K${ERROR} - $HYPR Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
}
|
||||
install_package "$HYPR" "$LOG"
|
||||
done
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Nvidia Stuffs #
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
|
||||
nvidia_pkg=(
|
||||
nvidia-dkms
|
||||
@@ -31,17 +28,17 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
||||
# nvidia stuff
|
||||
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 from official repo...${RESET}\n"
|
||||
printf "${YELLOW} Hyprland detected. removing 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
|
||||
fi
|
||||
|
||||
# Install additional Nvidia packages
|
||||
printf "${YELLOW} Installing Nvidia Packages and Linux headers...\n"
|
||||
printf "${YELLOW} Installing ${SKY_BLUE}Nvidia Packages and Linux headers${RESET}...\n"
|
||||
for krnl in $(cat /usr/lib/modules/*/pkgbase); do
|
||||
for NVIDIA in "${krnl}-headers" "${nvidia_pkg[@]}"; do
|
||||
install_package "$NVIDIA" 2>&1 | tee -a "$LOG"
|
||||
install_package "$NVIDIA" "$LOG"
|
||||
done
|
||||
done
|
||||
|
||||
@@ -50,17 +47,19 @@ if grep -qE '^MODULES=.*nvidia. *nvidia_modeset.*nvidia_uvm.*nvidia_drm' /etc/mk
|
||||
echo "Nvidia modules already included in /etc/mkinitcpio.conf" 2>&1 | tee -a "$LOG"
|
||||
else
|
||||
sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf 2>&1 | tee -a "$LOG"
|
||||
echo "Nvidia modules added in /etc/mkinitcpio.conf"
|
||||
echo "${OK} Nvidia modules added in /etc/mkinitcpio.conf"
|
||||
fi
|
||||
|
||||
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..3}
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
# 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 "${INFO} Seems like ${YELLOW}nvidia_drm modeset=1 fbdev=1${RESET} is already added in your system..moving on."
|
||||
printf "\n"
|
||||
else
|
||||
printf "\n"
|
||||
@@ -71,32 +70,32 @@ fi
|
||||
|
||||
# Additional for GRUB users
|
||||
if [ -f /etc/default/grub ]; then
|
||||
printf "GRUB bootloader detected\n" 2>&1 | tee -a "$LOG"
|
||||
printf "${INFO} ${YELLOW}GRUB${RESET} 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
|
||||
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub
|
||||
printf "nvidia-drm.modeset=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||
printf "${OK} nvidia-drm.modeset=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check if nvidia_drm.fbdev=1 is present
|
||||
if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
||||
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia_drm.fbdev=1"/' /etc/default/grub
|
||||
printf "nvidia_drm.fbdev=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||
printf "${OK} nvidia_drm.fbdev=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Regenerate GRUB configuration
|
||||
if sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub || sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
printf "GRUB configuration regenerated\n" 2>&1 | tee -a "$LOG"
|
||||
printf "${INFO} ${YELLOW}GRUB${RESET} 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 ${YELLOW}GRUB${RESET} 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} ${YELLOW}systemd-boot${RESET} 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)
|
||||
@@ -105,43 +104,17 @@ if [ -f /boot/loader/loader.conf ]; then
|
||||
find /boot/loader/entries/ -type f -name "*.conf" | while read imgconf; do
|
||||
# Backup conf
|
||||
sudo cp "$imgconf" "$imgconf.bak"
|
||||
printf "Backup created for systemd-boot loader: %s\n" "$imgconf" 2>&1 | tee -a "$LOG"
|
||||
printf "${INFO} Backup created for systemd-boot loader: %s\n" "$imgconf" 2>&1 | tee -a "$LOG"
|
||||
|
||||
# Clean up options and update with NVIDIA settings
|
||||
sdopt=$(grep -w "^options" "$imgconf" | sed 's/\b nvidia-drm.modeset=[^ ]*\b//g' | sed 's/\b nvidia_drm.fbdev=[^ ]*\b//g')
|
||||
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 ${YELLOW}systemd-boot${RESET} completed\n" 2>&1 | tee -a "$LOG"
|
||||
else
|
||||
printf "systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG"
|
||||
printf "${NOTE} ${YELLOW}systemd-boot${RESET} is already configured...\n" 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Blacklist nouveau
|
||||
if [[ -z $blacklist_nouveau ]]; then
|
||||
read -n1 -rep "${CAT} Would you like to blacklist nouveau? (y/n)" blacklist_nouveau
|
||||
fi
|
||||
echo
|
||||
if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
|
||||
NOUVEAU="/etc/modprobe.d/nouveau.conf"
|
||||
if [ -f "$NOUVEAU" ]; then
|
||||
printf "${OK} Seems like nouveau is already blacklisted..moving on.\n"
|
||||
else
|
||||
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
|
||||
printf "${NOTE} has been added to $NOUVEAU.\n"
|
||||
printf "\n"
|
||||
|
||||
# To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
|
||||
if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
|
||||
echo "install nouveau /bin/true" | sudo tee -a "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
||||
else
|
||||
echo "install nouveau /bin/true" | sudo tee "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
printf "${NOTE} Skipping nouveau blacklisting..." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
34
install-scripts/nvidia_nouveau.sh
Executable file
34
install-scripts/nvidia_nouveau.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Nvidia Blacklist #
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# Change the working directory to the parent directory of the script
|
||||
PARENT_DIR="$SCRIPT_DIR/.."
|
||||
cd "$PARENT_DIR" || exit 1
|
||||
|
||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
||||
|
||||
printf "${INFO} ${SKY_BLUE}blacklist nouveau${RESET}...\n"
|
||||
# Blacklist nouveau
|
||||
NOUVEAU="/etc/modprobe.d/nouveau.conf"
|
||||
if [ -f "$NOUVEAU" ]; then
|
||||
printf "${OK} Seems like ${YELLOW}nouveau${RESET} is already blacklisted..moving on.\n"
|
||||
else
|
||||
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
|
||||
|
||||
# To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
|
||||
if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
|
||||
echo "install nouveau /bin/true" | sudo tee -a "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
||||
else
|
||||
echo "install nouveau /bin/true" | sudo tee "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -8,7 +8,7 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pacman.log"
|
||||
|
||||
echo -e "${NOTE} Adding Extra Spice in pacman.conf ... ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
echo -e "${NOTE} Adding ${MAGENTA}Extra Spice${RESET} in pacman.conf ... ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
pacman_conf="/etc/pacman.conf"
|
||||
|
||||
# Remove comments '#' from specific lines
|
||||
@@ -32,14 +32,16 @@ done
|
||||
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
||||
if grep -q "^ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
||||
sudo sed -i "/^ParallelDownloads/a ILoveCandy" "$pacman_conf"
|
||||
echo -e "${CAT} Added ILoveCandy below ParallelDownloads. ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
echo -e "${CAT} Added ${MAGENTA}ILoveCandy${RESET} after ${MAGENTA}ParallelDownloads${RESET}. ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
else
|
||||
echo -e "${CAT} ILoveCandy already exists ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
echo -e "${CAT} It seems ${YELLOW}ILoveCandy${RESET} already exists ${RESET} moving on.." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
echo -e "${CAT} Pacman.conf spicing up completed ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
echo -e "${CAT} ${MAGENTA}Pacman.conf${RESET} spicing up completed ${RESET}" 2>&1 | tee -a "$LOG"
|
||||
|
||||
|
||||
# updating pacman.conf
|
||||
printf "\n%s - ${SKY_BLUE}Synchronizing Pacman Repo${RESET}" "${INFO}"
|
||||
sudo pacman -Sy
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -3,47 +3,50 @@
|
||||
# Paru AUR Helper #
|
||||
# NOTE: If yay is already installed, paru will not be installed #
|
||||
|
||||
pkg="paru-bin"
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="install-$(date +%d-%H%M%S)_paru.log"
|
||||
LOG="install-$(date +%d-%H%M%S)_yay.log"
|
||||
|
||||
# Set some colors for output messages
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA=$(tput setaf 5)
|
||||
WARNING=$(tput setaf 1)
|
||||
YELLOW=$(tput setaf 3)
|
||||
RESET=$(tput sgr0)
|
||||
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
ORANGE="$(tput setaf 214)"
|
||||
WARNING="$(tput setaf 1)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
GREEN="$(tput setaf 2)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
SKY_BLUE="$(tput setaf 6)"
|
||||
RESET="$(tput sgr0)"
|
||||
|
||||
# Create Directory for Install Logs
|
||||
if [ ! -d Install-Logs ]; then
|
||||
mkdir Install-Logs
|
||||
fi
|
||||
|
||||
# checking if paru exist and removing if it is
|
||||
if [ -d paru-bin ]; then
|
||||
rm -rf paru-bin 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check for AUR helper and install if not found
|
||||
ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
if [ -n "$ISAUR" ]; then
|
||||
printf "\n%s - AUR helper already installed, moving on..\n" "${OK}"
|
||||
printf "\n%s - ${SKY_BLUE}AUR helper${RESET} already installed, moving on.\n" "${OK}"
|
||||
else
|
||||
printf "\n%s - AUR helper was NOT located\n" "$WARN"
|
||||
printf "\n%s - Installing paru-bin from AUR\n" "${NOTE}"
|
||||
git clone https://aur.archlinux.org/paru-bin.git || { printf "%s - Failed to clone paru-bin 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 paru-bin from AUR\n" "${ERROR}"; exit 1; }
|
||||
|
||||
printf "\n%s - Installing ${SKY_BLUE}$pkg${RESET} from AUR\n" "${NOTE}"
|
||||
|
||||
# Check if folder exists and remove it
|
||||
if [ -d "$pkg" ]; then
|
||||
rm -rf "$pkg"
|
||||
fi
|
||||
git clone https://aur.archlinux.org/$pkg.git || { printf "%s - Failed to clone ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||
cd $pkg || { printf "%s - Failed to enter $pkg directory\n" "${ERROR}"; exit 1; }
|
||||
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||
|
||||
# moving install logs in to Install-Logs folder
|
||||
mv install*.log ../Install-Logs/ || true
|
||||
mv install*.log ../Install-Logs/ || true
|
||||
cd ..
|
||||
fi
|
||||
|
||||
@@ -53,4 +56,4 @@ ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
$ISAUR -Syu --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to update system\n" "${ERROR}"; exit 1; }
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -25,21 +25,21 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pipewire.log"
|
||||
|
||||
ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
# Disabling pulseaudio to avoid conflicts
|
||||
systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>/dev/null && tee -a "$LOG"
|
||||
# Disabling pulseaudio to avoid conflicts and logging output
|
||||
echo -e "${NOTE} Disabling pulseaudio to avoid conflicts..."
|
||||
systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>&1 > "$LOG"
|
||||
|
||||
# Pipewire
|
||||
printf "${NOTE} Installing Pipewire Packages...\n"
|
||||
echo -e "${NOTE} Installing ${SKY_BLUE}Pipewire${RESET} Packages..."
|
||||
for PIPEWIRE in "${pipewire[@]}"; do
|
||||
install_package "$PIPEWIRE" 2>&1 | tee -a "$LOG"
|
||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $PIPEWIRE Package installation failed, Please check the installation logs"; exit 1; }
|
||||
install_package "$PIPEWIRE" "$LOG"
|
||||
done
|
||||
|
||||
printf "Activating Pipewire Services...\n"
|
||||
echo -e "${NOTE} Activating Pipewire Services..."
|
||||
# Redirect systemctl output to log file
|
||||
systemctl --user enable --now pipewire.socket pipewire-pulse.socket wireplumber.service 2>&1 | tee -a "$LOG"
|
||||
systemctl --user enable --now pipewire.service 2>&1 | tee -a "$LOG"
|
||||
|
||||
echo -e "\n${OK} Pipewire Installation and services setup complete!" 2>&1 | tee -a "$LOG"
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Asus ROG Laptops #
|
||||
|
||||
rog=(
|
||||
power-profiles-daemon
|
||||
asusctl
|
||||
supergfxctl
|
||||
rog-control-center
|
||||
)
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
@@ -17,13 +24,9 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_rog.log"
|
||||
|
||||
### Install software for Asus ROG laptops ###
|
||||
|
||||
printf " Installing ASUS ROG packages...\n"
|
||||
for ASUS in power-profiles-daemon asusctl supergfxctl rog-control-center; do
|
||||
install_package "$ASUS" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[1A\e[K${ERROR} - $ASUS Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
printf " Installing ${SKY_BLUE}ASUS ROG packages${RESET}...\n"
|
||||
for ASUS in "${rog[@]}"; do
|
||||
install_package "$ASUS" "$LOG"
|
||||
done
|
||||
|
||||
printf " Activating ROG services...\n"
|
||||
@@ -32,5 +35,4 @@ sudo systemctl enable supergfxd 2>&1 | tee -a "$LOG"
|
||||
printf " enabling power-profiles-daemon...\n"
|
||||
sudo systemctl enable power-profiles-daemon 2>&1 | tee -a "$LOG"
|
||||
|
||||
clear
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# SDDM Log-in Manager #
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
|
||||
sddm=(
|
||||
qt6-5compat
|
||||
@@ -13,7 +10,6 @@ sddm=(
|
||||
)
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
@@ -30,75 +26,22 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log"
|
||||
# Install SDDM and SDDM theme
|
||||
printf "${NOTE} Installing sddm and dependencies........\n"
|
||||
for package in "${sddm[@]}"; do
|
||||
install_package "$package" 2>&1 | tee -a "$LOG"
|
||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $package Package installation failed, Please check the installation logs"; exit 1; }
|
||||
done
|
||||
install_package "$package" "$LOG"
|
||||
done
|
||||
|
||||
# Check if other login managers installed and disabling its service before enabling sddm
|
||||
for login_manager in lightdm gdm lxdm lxdm-gtk3; do
|
||||
for login_manager in lightdm gdm3 gdm lxdm xdm lxdm-gtk3; do
|
||||
if pacman -Qs "$login_manager" > /dev/null; then
|
||||
echo "disabling $login_manager..."
|
||||
sudo systemctl disable "$login_manager.service" 2>&1 | tee -a "$LOG"
|
||||
echo "$login_manager disabled."
|
||||
fi
|
||||
done
|
||||
|
||||
printf " Activating sddm service........\n"
|
||||
sudo systemctl enable sddm
|
||||
|
||||
# Set up SDDM
|
||||
echo -e "${NOTE} Setting up the login screen."
|
||||
sddm_conf_dir=/etc/sddm.conf.d
|
||||
[ ! -d "$sddm_conf_dir" ] && { printf "$CAT - $sddm_conf_dir not found, creating...\n"; sudo mkdir "$sddm_conf_dir" 2>&1 | tee -a "$LOG"; }
|
||||
|
||||
wayland_sessions_dir=/usr/share/wayland-sessions
|
||||
[ ! -d "$wayland_sessions_dir" ] && { printf "$CAT - $wayland_sessions_dir not found, creating...\n"; sudo mkdir "$wayland_sessions_dir" 2>&1 | tee -a "$LOG"; }
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
# SDDM-themes
|
||||
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 SDDM themes? (y/n)" install_sddm_theme
|
||||
fi
|
||||
if [[ $install_sddm_theme =~ ^[Yy]$ ]]; then
|
||||
printf "\n%s - Installing Simple SDDM Theme\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
|
||||
sudo rm -rf "/usr/share/sddm/themes/simple-sddm-2"
|
||||
echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm-2' directory." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check if simple-sddm-2 directory exists in the current directory and remove if it does
|
||||
if [ -d "simple-sddm-2" ]; then
|
||||
rm -rf "simple-sddm-2"
|
||||
echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm-2' directory from the current location." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
if git clone --depth 1 https://github.com/JaKooLit/simple-sddm-2.git; then
|
||||
while [ ! -d "simple-sddm-2" ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [ ! -d "/usr/share/sddm/themes" ]; then
|
||||
sudo mkdir -p /usr/share/sddm/themes
|
||||
echo -e "\e[1A\e[K${OK} - Directory '/usr/share/sddm/themes' created." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
sudo mv simple-sddm-2 /usr/share/sddm/themes/
|
||||
echo -e "[Theme]\nCurrent=simple-sddm-2" | sudo tee "$sddm_conf_dir/theme.conf.user" &>> "$LOG"
|
||||
else
|
||||
echo -e "\e[1A\e[K${ERROR} - Failed to clone the theme repository. Please check your internet connection" | tee -a "$LOG" >&2
|
||||
fi
|
||||
valid_input=true
|
||||
elif [[ $install_sddm_theme =~ ^[Nn]$ ]]; then
|
||||
printf "\n%s - No SDDM themes will be installed.\n" "${NOTE}" 2>&1 | tee -a "$LOG"
|
||||
valid_input=true
|
||||
else
|
||||
printf "\n%s - Invalid input. Please enter 'y' for Yes or 'n' for No.\n" "${ERROR}" 2>&1 | tee -a "$LOG"
|
||||
install_sddm_theme=""
|
||||
fi
|
||||
done
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
71
install-scripts/sddm_theme.sh
Executable file
71
install-scripts/sddm_theme.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# SDDM themes #
|
||||
|
||||
source_theme="https://codeberg.org/JaKooLit/sddm-sequoia"
|
||||
theme_name="sequoia_2"
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# Change the working directory to the parent directory of the script
|
||||
PARENT_DIR="$SCRIPT_DIR/.."
|
||||
cd "$PARENT_DIR" || exit 1
|
||||
|
||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm_theme.log"
|
||||
|
||||
# SDDM-themes
|
||||
printf "${INFO} Installing ${SKY_BLUE}Additional SDDM Theme${RESET}\n"
|
||||
|
||||
# Check if /usr/share/sddm/themes/$theme_name exists and remove if it does
|
||||
if [ -d "/usr/share/sddm/themes/$theme_name" ]; then
|
||||
sudo rm -rf "/usr/share/sddm/themes/$theme_name"
|
||||
echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check if $theme_name directory exists in the current directory and remove if it does
|
||||
if [ -d "$theme_name" ]; then
|
||||
rm -rf "$theme_name"
|
||||
echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory from the current location." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Clone the repository
|
||||
if git clone --depth 1 "$source_theme" "$theme_name"; then
|
||||
if [ ! -d "$theme_name" ]; then
|
||||
echo "${ERROR} Failed to clone the repository." | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Create themes directory if it doesn't exist
|
||||
if [ ! -d "/usr/share/sddm/themes" ]; then
|
||||
sudo mkdir -p /usr/share/sddm/themes
|
||||
echo "${OK} - Directory '/usr/share/sddm/themes' created." | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Move cloned theme to the themes directory
|
||||
sudo mv "$theme_name" "/usr/share/sddm/themes/$theme_name" 2>&1 | tee -a "$LOG"
|
||||
|
||||
# Set up new theme
|
||||
echo -e "${NOTE} Setting up the login screen."
|
||||
sddm_conf_dir=/etc/sddm.conf.d
|
||||
[ ! -d "$sddm_conf_dir" ] && { printf "$CAT - $sddm_conf_dir not found, creating...\n"; sudo mkdir -p "$sddm_conf_dir" 2>&1 | tee -a "$LOG"; }
|
||||
|
||||
# Configure theme settings
|
||||
echo -e "[Theme]\nCurrent=$theme_name" | sudo tee "$sddm_conf_dir/theme.conf.user" >> "$LOG"
|
||||
|
||||
# Replace current background from assets
|
||||
sudo cp -r assets/sddm.png "/usr/share/sddm/themes/$theme_name/backgrounds/default" 2>&1 | tee -a "$LOG"
|
||||
sudo sed -i 's|^wallpaper=".*"|wallpaper="backgrounds/default"|' "/usr/share/sddm/themes/$theme_name/theme.conf" 2>&1 | tee -a "$LOG"
|
||||
|
||||
echo "${OK} - ${MAGENTA}Additional SDDM Theme${RESET} successfully installed." | tee -a "$LOG"
|
||||
|
||||
else
|
||||
|
||||
echo "${ERROR} - Failed to clone the sddm theme repository. Please check your internet connection." | tee -a "$LOG" >&2
|
||||
fi
|
||||
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -2,10 +2,6 @@
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Thunar #
|
||||
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
|
||||
thunar=(
|
||||
thunar
|
||||
thunar-volman
|
||||
@@ -30,39 +26,22 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
|
||||
|
||||
# Thunar
|
||||
printf "${NOTE} Installing Thunar Packages...\n"
|
||||
printf "${INFO} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n"
|
||||
for THUNAR in "${thunar[@]}"; do
|
||||
install_package "$THUNAR" 2>&1 | tee -a "$LOG"
|
||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $THUNAR Package installation failed, Please check the installation logs"; exit 1; }
|
||||
install_package "$THUNAR" "$LOG"
|
||||
done
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
# Ask the user if they want to use Thunar as the default file manager
|
||||
read -p "${CAT} Do you want to set Thunar as the default file manager? (y/n): " thunar_default
|
||||
|
||||
if [[ "$thunar_default" == [Yy] ]]; then
|
||||
# Setting Thunar as the default file manager
|
||||
xdg-mime default thunar.desktop inode/directory
|
||||
xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search
|
||||
echo "${OK} Thunar has been set as the default file manager." 2>&1 | tee -a "$LOG"
|
||||
else
|
||||
echo "${NOTE} you choose not to set Thunar as default file manager." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "\n%.0s" {1..1}
|
||||
|
||||
# Check for existing configs and copy if does not exist
|
||||
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"
|
||||
cp -r assets/$DIR1 ~/.config/ && echo "Copy $DIR1 completed!" || echo "Error: Failed to copy $DIR1 config files." 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
|
||||
|
||||
clear
|
||||
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
25
install-scripts/thunar_default.sh
Executable file
25
install-scripts/thunar_default.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# Thunar-default #
|
||||
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# Change the working directory to the parent directory of the script
|
||||
PARENT_DIR="$SCRIPT_DIR/.."
|
||||
cd "$PARENT_DIR" || exit 1
|
||||
|
||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar-default.log"
|
||||
|
||||
printf "${INFO} Setting ${SKY_BLUE}Thunar${RESET} as default file manager...\n"
|
||||
|
||||
xdg-mime default thunar.desktop inode/directory
|
||||
xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search
|
||||
echo "${OK} ${MAGENTA}Thunar${RESET} is now set as the default file manager." | tee -a "$LOG"
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# XDG-Desktop-Portals #
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
# XDG-Desktop-Portals hyprland #
|
||||
|
||||
xdg=(
|
||||
xdg-desktop-portal-hyprland
|
||||
@@ -26,49 +23,9 @@ 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 ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n"
|
||||
for xdgs in "${xdg[@]}"; do
|
||||
install_package "$xdgs" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[1A\e[K${ERROR} - $xdph Package installation failed, Please check the installation logs"
|
||||
exit 1
|
||||
fi
|
||||
install_package "$xdgs" "$LOG"
|
||||
done
|
||||
|
||||
printf "${NOTE} Checking for other XDG-Desktop-Portal-Implementations....\n"
|
||||
sleep 1
|
||||
printf "\n"
|
||||
printf "${NOTE} XDG-desktop-portal-KDE & GNOME (if installed) should be manually disabled or removed! I can't remove it... sorry...\n"
|
||||
while true; do
|
||||
printf "\n%.0s" {1..2}
|
||||
if [[ -z $XDPH1 ]]; then
|
||||
read -rp "${CAT} Would you like to try to remove other XDG-Desktop-Portal-Implementations? (y/n) " XDPH1
|
||||
fi
|
||||
echo
|
||||
sleep 1
|
||||
|
||||
case $XDPH1 in
|
||||
[Yy])
|
||||
# Clean out other portals
|
||||
printf "${NOTE} Clearing any other xdg-desktop-portal implementations...\n"
|
||||
# Check if packages are installed and uninstall if present
|
||||
if pacman -Qs xdg-desktop-portal-wlr > /dev/null ; then
|
||||
echo "Removing xdg-desktop-portal-wlr..."
|
||||
sudo pacman -R --noconfirm xdg-desktop-portal-wlr 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
if pacman -Qs xdg-desktop-portal-lxqt > /dev/null ; then
|
||||
echo "Removing xdg-desktop-portal-lxqt..."
|
||||
sudo pacman -R --noconfirm xdg-desktop-portal-lxqt 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
break
|
||||
;;
|
||||
[Nn])
|
||||
echo "no other XDG-implementations will be removed." >> "$LOG"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Invalid input. Please enter 'y' for yes or 'n' for no."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Yay AUR Helper #
|
||||
# NOTE: If paru is already installed, yay will not be installed #
|
||||
|
||||
pkg="yay-bin"
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Set the name of the log file to include the current date and time
|
||||
@@ -12,33 +13,37 @@ LOG="install-$(date +%d-%H%M%S)_yay.log"
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA=$(tput setaf 5)
|
||||
WARNING=$(tput setaf 1)
|
||||
YELLOW=$(tput setaf 3)
|
||||
RESET=$(tput sgr0)
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
ORANGE="$(tput setaf 214)"
|
||||
WARNING="$(tput setaf 1)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
GREEN="$(tput setaf 2)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
SKY_BLUE="$(tput setaf 6)"
|
||||
RESET="$(tput sgr0)"
|
||||
|
||||
# Create Directory for Install Logs
|
||||
if [ ! -d Install-Logs ]; then
|
||||
mkdir Install-Logs
|
||||
fi
|
||||
|
||||
# Check Existing yay
|
||||
if [ -d yay ]; then
|
||||
rm -rf yay 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check for AUR helper and install if not found
|
||||
ISAUR=$(command -v yay || command -v paru)
|
||||
if [ -n "$ISAUR" ]; then
|
||||
printf "\n%s - AUR helper already installed, moving on.\n" "${OK}"
|
||||
printf "\n%s - ${SKY_BLUE}AUR helper${RESET} already installed, moving on.\n" "${OK}"
|
||||
else
|
||||
printf "\n%s - AUR helper was NOT located\n" "$WARN"
|
||||
printf "\n%s - Installing yay from AUR\n" "${NOTE}"
|
||||
git clone https://aur.archlinux.org/yay.git || { printf "%s - Failed to clone yay 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 yay from AUR\n" "${ERROR}"; exit 1; }
|
||||
printf "\n%s - Installing ${SKY_BLUE}$pkg${RESET} from AUR\n" "${NOTE}"
|
||||
|
||||
# Check if folder exists and remove it
|
||||
if [ -d "$pkg" ]; then
|
||||
rm -rf "$pkg"
|
||||
fi
|
||||
git clone https://aur.archlinux.org/$pkg.git || { printf "%s - Failed to clone ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||
cd $pkg || { printf "%s - Failed to enter $pkg directory\n" "${ERROR}"; exit 1; }
|
||||
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||
|
||||
# moving install logs in to Install-Logs folder
|
||||
mv install*.log ../Install-Logs/ || true
|
||||
@@ -51,4 +56,4 @@ ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
$ISAUR -Syu --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to update system\n" "${ERROR}"; exit 1; }
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
@@ -1,18 +1,14 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# zsh and oh my zsh including pokemon-color-scripts#
|
||||
if [[ $USE_PRESET = [Yy] ]]; then
|
||||
source ./preset.sh
|
||||
fi
|
||||
# zsh and oh my zsh#
|
||||
|
||||
zsh=(
|
||||
eza
|
||||
zsh
|
||||
zsh-completions
|
||||
fzf
|
||||
zsh_pkg=(
|
||||
eza
|
||||
zsh
|
||||
zsh-completions
|
||||
fzf
|
||||
)
|
||||
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
@@ -26,83 +22,54 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
# Set the name of the log file to include the current date and time
|
||||
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
|
||||
fi
|
||||
case "$pokemon_choice" in
|
||||
[Yy]*)
|
||||
zsh+=('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]*)
|
||||
echo "${NOTE}Skipping Pokemon color scripts installation.${RESET}" 2>&1 | tee -a "$LOG"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Installing zsh packages
|
||||
printf "${NOTE} Installing core zsh packages...${RESET}\n"
|
||||
for ZSH in "${zsh[@]}"; do
|
||||
install_package "$ZSH" 2>&1 | tee -a "$LOG"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[1A\e[K${ERROR} - $ZSH Package installation failed, Please check the installation logs"
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing core zsh packages
|
||||
printf "\n%s - Installing ${SKY_BLUE}zsh packages${RESET} .... \n" "${NOTE}"
|
||||
for ZSH in "${zsh_pkg[@]}"; do
|
||||
install_package "$ZSH" "$LOG"
|
||||
done
|
||||
|
||||
# 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"
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true
|
||||
else
|
||||
echo "Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
# Check if the directories exist before cloning the repositories
|
||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true
|
||||
else
|
||||
echo "Directory zsh-autosuggestions already exists. Skipping cloning." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n"
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true
|
||||
else
|
||||
echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
# Check if the directories exist before cloning the repositories
|
||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true
|
||||
else
|
||||
echo "${INFO} Directory zsh-autosuggestions already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true
|
||||
else
|
||||
echo "Directory zsh-syntax-highlighting already exists. Skipping cloning." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
|
||||
fi
|
||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true
|
||||
else
|
||||
echo "${INFO} Directory zsh-syntax-highlighting already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||
fi
|
||||
|
||||
# Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.zprofile" ]; then
|
||||
cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
|
||||
fi
|
||||
|
||||
# Copying the preconfigured zsh themes and profile
|
||||
cp -r 'assets/.zshrc' ~/
|
||||
cp -r 'assets/.zprofile' ~/
|
||||
if [ -f "$HOME/.zprofile" ]; then
|
||||
cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
|
||||
fi
|
||||
|
||||
# Copying the preconfigured zsh themes and profile
|
||||
cp -r 'assets/.zshrc' ~/
|
||||
cp -r 'assets/.zprofile' ~/
|
||||
|
||||
printf "${NOTE} Changing default shell to zsh...\n"
|
||||
|
||||
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} 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 "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
|
||||
|
||||
fi
|
||||
|
||||
clear
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
29
install-scripts/zsh_pokemon.sh
Executable file
29
install-scripts/zsh_pokemon.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# 💫 https://github.com/JaKooLit 💫 #
|
||||
# pokemon-color-scripts#
|
||||
|
||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||
# Determine the directory where the script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# Change the working directory to the parent directory of the script
|
||||
PARENT_DIR="$SCRIPT_DIR/.."
|
||||
cd "$PARENT_DIR" || exit 1
|
||||
|
||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||
|
||||
# Set the name of the log file to include the current date and time
|
||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh_pokemon.log"
|
||||
|
||||
printf "${INFO} Installing ${SKY_BLUE}Pokemon color scripts${RESET} ..."
|
||||
install_package 'pokemon-colorscripts-git' "$LOG"
|
||||
|
||||
# Check if ~/.zshrc exists
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' "$HOME/.zshrc" >> "$LOG" 2>&1
|
||||
sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' "$HOME/.zshrc" >> "$LOG" 2>&11
|
||||
else
|
||||
echo "$HOME/.zshrc not found. Cant enable ${YELLOW}Pokemon color scripts${RESET}" >> "$LOG" 2>&1
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
Reference in New Issue
Block a user