updated since many conflicts
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
## Changelogs
|
## Changelogs
|
||||||
|
|
||||||
## 01 Fed 2025
|
## 06 Feb 2025
|
||||||
- added a small scripts in the assets directory to install git and non-git version of hyprland (instruction on the readme)
|
- added semi-unattended function.
|
||||||
|
- move all the initial questions at the beginning
|
||||||
|
|
||||||
## 30 Jan 2025
|
## 04 Feb 2025
|
||||||
- separate AGS v1 installation separate
|
- Re-coded for better visibility
|
||||||
|
- Offered a new SDDM theme.
|
||||||
|
- script will automatically detect if you have nvidia but script still offer if you want to set up for user
|
||||||
|
|
||||||
## 29 Jan 2025
|
## 29 Jan 2025
|
||||||
- enhanced nvidia.sh to add additional systemd-bootloader entries for nvidia
|
- enhanced nvidia.sh to add additional systemd-bootloader entries for nvidia
|
||||||
|
|||||||
BIN
Installer.png
BIN
Installer.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 589 KiB |
40
README.md
40
README.md
@@ -109,7 +109,7 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
|
|||||||
- inside the install-scripts directory, you can edit 00-hypr-pkgs.sh. Care though as the Hyprland Dots may not work properly!
|
- inside the install-scripts directory, you can edit 00-hypr-pkgs.sh. Care though as the Hyprland Dots may not work properly!
|
||||||
|
|
||||||
#### 💫 SDDM and GTK Themes offered
|
#### 💫 SDDM and GTK Themes offered
|
||||||
- If you opted to install SDDM theme, here's the [`LINK`](https://github.com/JaKooLit/simple-sddm-2)
|
- If you opted to install SDDM theme, here's the [`LINK`](https://codeberg.org/JaKooLit/sddm-sequoia) which is a fork of [`LINK`](https://codeberg.org/minMelody/sddm-sequoia)
|
||||||
- If you opted to install GTK Themes, Icons, here's the [`LINK`](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor.
|
- If you opted to install GTK Themes, Icons, here's the [`LINK`](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor.
|
||||||
|
|
||||||
#### 👀 NVidia GPU Owners.
|
#### 👀 NVidia GPU Owners.
|
||||||
@@ -119,12 +119,7 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
|
|||||||
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
|
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
|
||||||
|
|
||||||
## ✨ to use this script
|
## ✨ to use this script
|
||||||
> clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
|
- clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
|
||||||
|
|
||||||
>[!IMPORTANT]
|
|
||||||
> Make sure you have base-devel installed
|
|
||||||
|
|
||||||
- Without base-devel installed, script will fail
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland
|
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland
|
||||||
@@ -136,6 +131,24 @@ chmod +x install.sh
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img align="center" width="100%" src="https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/Installer.png" />
|
<img align="center" width="100%" src="https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/Installer.png" />
|
||||||
|
|
||||||
|
|
||||||
|
### 🤟 semi-unattended installation (new for 2025)
|
||||||
|
- edit preset.sh to modify what packages you want. Make sure to change only with Y or N
|
||||||
|
- to use preset instead of usual `./install.sh` you can ran like this
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./install.sh --preset
|
||||||
|
```
|
||||||
|
|
||||||
|
- if you have nvidia you can add --nvidia argument
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./install.sh --preset --nvidia
|
||||||
|
```
|
||||||
|
|
||||||
|
- its called semi-unattended it is because you still have to answer some questions when installing KooL's Hyprland Dots
|
||||||
|
|
||||||
|
|
||||||
#### ✨ for ZSH and OH-MY-ZSH installation
|
#### ✨ for ZSH and OH-MY-ZSH installation
|
||||||
> installer should auto change your default shell to zsh. However, if it does not, do this
|
> installer should auto change your default shell to zsh. However, if it does not, do this
|
||||||
```bash
|
```bash
|
||||||
@@ -171,16 +184,11 @@ source ~/.zshrc
|
|||||||
- CD into Arch-Hyprland directory and then ran the below command.
|
- CD into Arch-Hyprland directory and then ran the below command.
|
||||||
- i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or
|
- i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or
|
||||||
- `./install-scripts/sddm.sh` - For reinstall sddm
|
- `./install-scripts/sddm.sh` - For reinstall sddm
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> DO NOT cd into install-scripts directory as script will most likely to fail
|
> DO NOT cd into install-scripts directory as script will most likely to fail
|
||||||
|
|
||||||
#### 🎞️ AGS Overview DEMO
|
|
||||||
- in case you wonder, here is a short demo of AGS overview [Youtube LINK](https://youtu.be/zY5SLNPBJTs)
|
|
||||||
|
|
||||||
#### 🛣️ Roadmap:
|
#### 🛣️ Roadmap:
|
||||||
- ~~[ ] Install zsh and oh-my-zsh without necessary steps above~~ DONE
|
- [ ] show a progress bar in downloading and compiling part when installing outside AUR or official repo
|
||||||
- [ ] possibly adding gruvbox themes, cursors, icons
|
|
||||||
|
|
||||||
#### ❗ some known issues for nvidia
|
#### ❗ some known issues for nvidia
|
||||||
- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was
|
- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was
|
||||||
@@ -218,12 +226,6 @@ env = WLR_RENDERER_ALLOW_SOFTWARE,1
|
|||||||
#### 🫥 Improving performance for Older Nvidia Cards using driver 470
|
#### 🫥 Improving performance for Older Nvidia Cards using driver 470
|
||||||
- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
|
- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
|
||||||
|
|
||||||
|
|
||||||
#### ➕ Added Hyprland install either git or non-git version
|
|
||||||
- on assets directory of Arch-Hyprland, you will find install scripts to assist in switching non-git and git version of hyprland
|
|
||||||
- pretty straight forward `chmod +x actions.sh` `./actions.sh` and `1 for non-git` and `2 for git version`
|
|
||||||
|
|
||||||
|
|
||||||
#### 📒 Final Notes
|
#### 📒 Final Notes
|
||||||
- join my discord channel [`Discord`](https://discord.com/invite/9JEgZsfhex)
|
- join my discord channel [`Discord`](https://discord.com/invite/9JEgZsfhex)
|
||||||
- Feel free to copy, re-distribute, and use this script however you want. Would appreciate if you give me some loves by crediting my work :)
|
- Feel free to copy, re-distribute, and use this script however you want. Would appreciate if you give me some loves by crediting my work :)
|
||||||
|
|||||||
BIN
assets/sddm.png
Normal file
BIN
assets/sddm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1007 KiB |
@@ -14,10 +14,10 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_base.log"
|
|||||||
|
|
||||||
|
|
||||||
# Installation of main components
|
# 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
|
for PKG1 in "${base[@]}"; do
|
||||||
sudo pacman -S --noconfirm "$PKG1" | tee -a "$LOG"
|
install_package_pacman "$PKG1" "$LOG"
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -77,6 +77,8 @@ uninstall=(
|
|||||||
cachyos-hyprland-settings
|
cachyos-hyprland-settings
|
||||||
rofi
|
rofi
|
||||||
wallust-git
|
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! ##
|
## 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
|
# 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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log"
|
||||||
|
|
||||||
# uninstalling conflicting packages
|
# conflicting packages removal
|
||||||
# Initialize a variable to track overall errors
|
|
||||||
overall_failed=0
|
overall_failed=0
|
||||||
|
printf "\n%s - ${SKY_BLUE}Removing some packages${RESET} as it conflicts with KooL's Hyprland Dots \n" "${NOTE}"
|
||||||
printf "\n%s - Removing Mako, Dunst, and rofi as they conflict with swaync and rofi-wayland \n" "${NOTE}"
|
|
||||||
for PKG in "${uninstall[@]}"; do
|
for PKG in "${uninstall[@]}"; do
|
||||||
uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
|
uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
# Track if any uninstallation failed
|
|
||||||
overall_failed=1
|
overall_failed=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -109,17 +108,13 @@ if [ $overall_failed -ne 0 ]; then
|
|||||||
echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
|
echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Installation of main components
|
# 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
|
for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
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
|
# 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"
|
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
|
# Initialize an empty array to hold missing packages
|
||||||
missing=()
|
missing=()
|
||||||
local_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() {
|
is_installed_pacman() {
|
||||||
pacman -Qi "$1" &>/dev/null
|
pacman -Qi "$1" &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Loop through each package
|
# Loop through each package
|
||||||
for pkg in "${packages[@]}"; do
|
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
|
if ! is_installed_pacman "$pkg"; then
|
||||||
missing+=("$pkg")
|
missing+=("$pkg")
|
||||||
fi
|
fi
|
||||||
@@ -67,25 +67,24 @@ done
|
|||||||
|
|
||||||
# Log missing packages
|
# Log missing packages
|
||||||
if [ ${#missing[@]} -eq 0 ] && [ ${#local_missing[@]} -eq 0 ]; then
|
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
|
else
|
||||||
if [ ${#missing[@]} -ne 0 ]; then
|
if [ ${#missing[@]} -ne 0 ]; then
|
||||||
echo "${WARN} The following packages are not installed and will be logged:"
|
echo "${WARN} The following packages are not installed and will be logged:"
|
||||||
for pkg in "${missing[@]}"; do
|
for pkg in "${missing[@]}"; do
|
||||||
echo "$pkg"
|
echo "${WARNING}$pkg${RESET}"
|
||||||
echo "$pkg" >> "$LOG" # Log the missing package to the file
|
echo "$pkg" >> "$LOG"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#local_missing[@]} -ne 0 ]; then
|
if [ ${#local_missing[@]} -ne 0 ]; then
|
||||||
echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
|
echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
|
||||||
for pkg1 in "${local_missing[@]}"; do
|
for pkg1 in "${local_missing[@]}"; do
|
||||||
echo "$pkg1 is not installed. Can't find it in /usr/local/bin/"
|
echo "${WARNING}$pkg1${REST} is not installed. Can't find it in /usr/local/bin/"
|
||||||
echo "$pkg1" >> "$LOG" # Log the missing local package to the file
|
echo "$pkg1" >> "$LOG"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add a timestamp when the missing packages were logged
|
|
||||||
echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
|
echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -8,80 +8,108 @@ set -e
|
|||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
MAGENTA=$(tput setaf 5)
|
MAGENTA="$(tput setaf 5)"
|
||||||
WARNING=$(tput setaf 1)
|
ORANGE="$(tput setaf 214)"
|
||||||
YELLOW=$(tput setaf 3)
|
WARNING="$(tput setaf 1)"
|
||||||
RESET=$(tput sgr0)
|
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
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
mkdir Install-Logs
|
mkdir Install-Logs
|
||||||
fi
|
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() {
|
install_package_pacman() {
|
||||||
# Checking 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} $1 is already installed. Skipping..."
|
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||||
else
|
else
|
||||||
# Package not installed
|
# Run pacman and redirect all output to a log file
|
||||||
echo -e "${NOTE} Installing $1 ..."
|
(
|
||||||
sudo pacman -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
|
stdbuf -oL sudo pacman -S --noconfirm "$1" 2>&1
|
||||||
# Making sure package is installed
|
) >> "$LOG" 2>&1 &
|
||||||
|
PID=$!
|
||||||
|
show_progress $PID "$1"
|
||||||
|
|
||||||
|
# Double check if package is installed
|
||||||
if pacman -Q "$1" &>/dev/null ; then
|
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
|
else
|
||||||
# Something is missing, exiting to review log
|
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the $LOG. You may need to install manually."
|
||||||
echo -e "${ERROR} $1 failed to install. Please check the $LOG. You may need to install manually."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
|
|
||||||
# Function for installing packages
|
# Function to install packages with either yay or paru
|
||||||
install_package() {
|
install_package() {
|
||||||
# Checking if package is already installed
|
|
||||||
if $ISAUR -Q "$1" &>> /dev/null ; then
|
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
|
else
|
||||||
# Package not installed
|
(
|
||||||
echo -e "${NOTE} Installing $1 ..."
|
stdbuf -oL $ISAUR -S --noconfirm "$1" 2>&1
|
||||||
$ISAUR -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
|
) >> "$LOG" 2>&1 &
|
||||||
# Making sure package is installed
|
PID=$!
|
||||||
|
show_progress $PID "$1"
|
||||||
|
|
||||||
|
# Double check if package is installed
|
||||||
if $ISAUR -Q "$1" &>> /dev/null ; then
|
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
|
else
|
||||||
# Something is missing, exiting to review log
|
# 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 :("
|
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 :("
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function for uninstalling packages
|
# Function for removing packages
|
||||||
uninstall_package() {
|
uninstall_package() {
|
||||||
local pkg="$1"
|
local pkg="$1"
|
||||||
|
|
||||||
# Checking if package is installed
|
# Checking if package is installed
|
||||||
if pacman -Qi "$pkg" &>> /dev/null ; then
|
if pacman -Qi "$pkg" &>/dev/null; then
|
||||||
# Package is installed
|
echo -e "${NOTE} removing $pkg ..."
|
||||||
echo -e "${NOTE} Uninstalling $pkg ..."
|
|
||||||
sudo pacman -R --noconfirm "$pkg" 2>&1 | tee -a "$LOG" | grep -v "error: target not found"
|
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
|
if ! pacman -Qi "$pkg" &>/dev/null; then
|
||||||
echo -e "\e[1A\e[K${OK} $pkg was uninstalled."
|
echo -e "\e[1A\e[K${OK} $pkg removed."
|
||||||
else
|
else
|
||||||
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall. Please check the log."
|
echo -e "\e[1A\e[K${ERROR} $pkg Removal failed. No actions required."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
|
echo -e "${INFO} Package $pkg not installed, skipping."
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,6 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Adding users into input group #
|
# 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! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
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
|
# 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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
|
||||||
|
|
||||||
while true; do
|
# Check if the 'input' group exists
|
||||||
echo "${WARN} This script will add your user to the 'input' group."
|
if grep -q '^input:' /etc/group; then
|
||||||
echo "${NOTE} Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality."
|
echo "${OK} ${MAGENTA}input${RESET} group exists."
|
||||||
|
else
|
||||||
printf "\n%.0s" {1..1}
|
echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..."
|
||||||
|
sudo groupadd input
|
||||||
if [[ -z $input_group_choid ]]; then
|
echo "${MAGENTA}input${RESET} group created" >> "$LOG"
|
||||||
read -p "${YELLOW}Do you want to proceed? (y/n): ${RESET}" input_group_choid
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $input_group_choid == "y" || $input_group_choid == "Y" ]]; then
|
# Add the user to the 'input' group
|
||||||
# Check if the 'input' group exists
|
sudo usermod -aG input "$(whoami)"
|
||||||
if grep -q '^input:' /etc/group; then
|
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"
|
||||||
echo "${OK} 'input' group exists."
|
|
||||||
else
|
|
||||||
echo "${NOTE} 'input' group doesn't exist. Creating 'input' group..."
|
|
||||||
sudo groupadd input
|
|
||||||
|
|
||||||
# Log the creation of the 'input' group
|
printf "\n%.0s" {1..2}
|
||||||
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
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Aylur's GTK Shell v 1.9.0#
|
# Aylur's GTK Shell v 1.9.0 #
|
||||||
# for desktop overview
|
# for desktop overview
|
||||||
|
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
|
||||||
MLOG="install-$(date +%d-%H%M%S)_ags2.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
|
# 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
|
# Installing ags Dependencies
|
||||||
for PKG1 in "${ags[@]}"; do
|
for PKG1 in "${ags[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
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
|
# Check if folder exists and remove it
|
||||||
if [ -d "ags" ]; then
|
if [ -d "ags" ]; then
|
||||||
@@ -63,24 +68,26 @@ if [ -d "ags" ]; then
|
|||||||
rm -rf "ags"
|
rm -rf "ags"
|
||||||
fi
|
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
|
if git clone --recursive -b "$ags_tag" --depth 1 https://github.com/Aylur/ags.git; then
|
||||||
cd ags || exit 1
|
cd ags || exit 1
|
||||||
# Build and install ags
|
|
||||||
npm install
|
npm install
|
||||||
meson setup build
|
meson setup build
|
||||||
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
||||||
printf "${OK} ags installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Installation failed for ags" 2>&1 | tee -a "$MLOG"
|
echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Move logs to Install-Logs directory
|
# Move logs to Install-Logs directory
|
||||||
mv "$MLOG" ../Install-Logs/ || true
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
cd ..
|
cd ..
|
||||||
else
|
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
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log"
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
printf "${NOTE} Installing Bluetooth Packages...\n"
|
printf "${NOTE} Installing ${SKY_BLUE}Bluetooth${RESET} Packages...\n"
|
||||||
for BLUE in "${blue[@]}"; do
|
for BLUE in "${blue[@]}"; do
|
||||||
install_package "$BLUE" 2>&1 | tee -a "$LOG"
|
install_package "$BLUE" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $BLUE Package installation failed, Please check the installation logs"; exit 1; }
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating Bluetooth Services...\n"
|
printf " Activating ${YELLOW}Bluetooth${RESET} Services...\n"
|
||||||
sudo systemctl enable --now bluetooth.service 2>&1 | tee -a "$LOG"
|
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"
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||||
|
|
||||||
# Check if Hyprland-Dots exists
|
# 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
|
if [ -d Hyprland-Dots ]; then
|
||||||
cd Hyprland-Dots
|
cd Hyprland-Dots
|
||||||
@@ -22,8 +22,8 @@ else
|
|||||||
chmod +x copy.sh
|
chmod +x copy.sh
|
||||||
./copy.sh
|
./copy.sh
|
||||||
else
|
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
|
||||||
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
|
# 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
|
for PKG1 in "${fonts[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
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
|
# installing engine needed for gtk themes
|
||||||
for PKG1 in "${engine[@]}"; do
|
for PKG1 in "${engine[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check if the directory exists and delete it if present
|
# 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"
|
rm -rf "GTK-themes-icons" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
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
|
if git clone --depth 1 https://github.com/JaKooLit/GTK-themes-icons.git ; then
|
||||||
cd GTK-themes-icons
|
cd GTK-themes-icons
|
||||||
chmod +x auto-extract.sh
|
chmod +x auto-extract.sh
|
||||||
@@ -48,4 +44,4 @@ else
|
|||||||
echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG"
|
echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
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
|
# 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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Hyprland
|
# Hyprland
|
||||||
printf "${NOTE} Installing Hyprland .......\n"
|
printf "${NOTE} Installing ${SKY_BLUE}Hyprland packages${RESET} .......\n"
|
||||||
for HYPR in "${hypr[@]}"; do
|
for HYPR in "${hypr[@]}"; do
|
||||||
install_package "$HYPR" 2>&1 | tee -a "$LOG"
|
install_package "$HYPR" "$LOG"
|
||||||
[ $? -ne 0 ] && {
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $HYPR Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Nvidia Stuffs #
|
# Nvidia Stuffs #
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
nvidia_pkg=(
|
nvidia_pkg=(
|
||||||
nvidia-dkms
|
nvidia-dkms
|
||||||
@@ -31,17 +28,17 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
|||||||
# nvidia stuff
|
# nvidia stuff
|
||||||
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 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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install additional Nvidia packages
|
# 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 krnl in $(cat /usr/lib/modules/*/pkgbase); do
|
||||||
for NVIDIA in "${krnl}-headers" "${nvidia_pkg[@]}"; do
|
for NVIDIA in "${krnl}-headers" "${nvidia_pkg[@]}"; do
|
||||||
install_package "$NVIDIA" 2>&1 | tee -a "$LOG"
|
install_package "$NVIDIA" "$LOG"
|
||||||
done
|
done
|
||||||
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"
|
echo "Nvidia modules already included in /etc/mkinitcpio.conf" 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf 2>&1 | tee -a "$LOG"
|
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
|
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"
|
sudo mkinitcpio -P 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
printf "\n%.0s" {1..3}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Additional Nvidia steps
|
# Additional Nvidia steps
|
||||||
NVEA="/etc/modprobe.d/nvidia.conf"
|
NVEA="/etc/modprobe.d/nvidia.conf"
|
||||||
if [ -f "$NVEA" ]; then
|
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"
|
printf "\n"
|
||||||
else
|
else
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@@ -71,32 +70,32 @@ fi
|
|||||||
|
|
||||||
# Additional for GRUB users
|
# Additional for GRUB users
|
||||||
if [ -f /etc/default/grub ]; then
|
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
|
# Check if nvidia-drm.modeset=1 is present
|
||||||
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
# Check if nvidia_drm.fbdev=1 is present
|
# Check if nvidia_drm.fbdev=1 is present
|
||||||
if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
# Regenerate GRUB configuration
|
# 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
|
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
|
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
|
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
|
fi
|
||||||
|
|
||||||
# Additional for systemd-boot users
|
# Additional for systemd-boot users
|
||||||
if [ -f /boot/loader/loader.conf ]; then
|
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)
|
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)
|
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
|
find /boot/loader/entries/ -type f -name "*.conf" | while read imgconf; do
|
||||||
# Backup conf
|
# Backup conf
|
||||||
sudo cp "$imgconf" "$imgconf.bak"
|
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
|
# 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')
|
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"
|
sudo sed -i "/^options/c${sdopt} nvidia-drm.modeset=1 nvidia_drm.fbdev=1" "$imgconf" 2>&1 | tee -a "$LOG"
|
||||||
done
|
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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
|
||||||
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
|
|
||||||
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
|
# 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"
|
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"
|
pacman_conf="/etc/pacman.conf"
|
||||||
|
|
||||||
# Remove comments '#' from specific lines
|
# Remove comments '#' from specific lines
|
||||||
@@ -32,14 +32,16 @@ done
|
|||||||
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
||||||
if grep -q "^ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
if grep -q "^ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
||||||
sudo sed -i "/^ParallelDownloads/a ILoveCandy" "$pacman_conf"
|
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
|
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
|
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
|
# updating pacman.conf
|
||||||
|
printf "\n%s - ${SKY_BLUE}Synchronizing Pacman Repo${RESET}" "${INFO}"
|
||||||
sudo pacman -Sy
|
sudo pacman -Sy
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -3,47 +3,50 @@
|
|||||||
# Paru AUR Helper #
|
# Paru AUR Helper #
|
||||||
# NOTE: If yay is already installed, paru will not be installed #
|
# 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! ##
|
## 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
|
# 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
|
# Set some colors for output messages
|
||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
MAGENTA=$(tput setaf 5)
|
MAGENTA="$(tput setaf 5)"
|
||||||
WARNING=$(tput setaf 1)
|
ORANGE="$(tput setaf 214)"
|
||||||
YELLOW=$(tput setaf 3)
|
WARNING="$(tput setaf 1)"
|
||||||
RESET=$(tput sgr0)
|
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
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
mkdir Install-Logs
|
mkdir Install-Logs
|
||||||
fi
|
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
|
# Check for AUR helper and install if not found
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
|
|
||||||
if [ -n "$ISAUR" ]; then
|
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
|
else
|
||||||
printf "\n%s - AUR helper was NOT located\n" "$WARN"
|
printf "\n%s - Installing ${SKY_BLUE}$pkg${RESET} from AUR\n" "${NOTE}"
|
||||||
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; }
|
# Check if folder exists and remove it
|
||||||
cd paru-bin || { printf "%s - Failed to enter paru directory\n" "${ERROR}"; exit 1; }
|
if [ -d "$pkg" ]; then
|
||||||
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install paru-bin from AUR\n" "${ERROR}"; exit 1; }
|
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
|
# moving install logs in to Install-Logs folder
|
||||||
mv install*.log ../Install-Logs/ || true
|
mv install*.log ../Install-Logs/ || true
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
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; }
|
$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
|
# 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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pipewire.log"
|
||||||
|
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
# Disabling pulseaudio to avoid conflicts and logging output
|
||||||
|
echo -e "${NOTE} Disabling pulseaudio to avoid conflicts..."
|
||||||
# Disabling pulseaudio to avoid conflicts
|
systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>&1 > "$LOG"
|
||||||
systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>/dev/null && tee -a "$LOG"
|
|
||||||
|
|
||||||
# Pipewire
|
# Pipewire
|
||||||
printf "${NOTE} Installing Pipewire Packages...\n"
|
echo -e "${NOTE} Installing ${SKY_BLUE}Pipewire${RESET} Packages..."
|
||||||
for PIPEWIRE in "${pipewire[@]}"; do
|
for PIPEWIRE in "${pipewire[@]}"; do
|
||||||
install_package "$PIPEWIRE" 2>&1 | tee -a "$LOG"
|
install_package "$PIPEWIRE" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $PIPEWIRE Package installation failed, Please check the installation logs"; exit 1; }
|
|
||||||
done
|
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.socket pipewire-pulse.socket wireplumber.service 2>&1 | tee -a "$LOG"
|
||||||
systemctl --user enable --now pipewire.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 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Asus ROG Laptops #
|
# 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! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
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 ###
|
### Install software for Asus ROG laptops ###
|
||||||
|
|
||||||
printf " Installing ASUS ROG packages...\n"
|
printf " Installing ${SKY_BLUE}ASUS ROG packages${RESET}...\n"
|
||||||
for ASUS in power-profiles-daemon asusctl supergfxctl rog-control-center; do
|
for ASUS in "${rog[@]}"; do
|
||||||
install_package "$ASUS" 2>&1 | tee -a "$LOG"
|
install_package "$ASUS" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $ASUS Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating ROG services...\n"
|
printf " Activating ROG services...\n"
|
||||||
@@ -32,5 +35,4 @@ sudo systemctl enable supergfxd 2>&1 | tee -a "$LOG"
|
|||||||
printf " enabling power-profiles-daemon...\n"
|
printf " enabling power-profiles-daemon...\n"
|
||||||
sudo systemctl enable power-profiles-daemon 2>&1 | tee -a "$LOG"
|
sudo systemctl enable power-profiles-daemon 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# SDDM Log-in Manager #
|
# SDDM Log-in Manager #
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
sddm=(
|
sddm=(
|
||||||
qt6-5compat
|
qt6-5compat
|
||||||
@@ -13,7 +10,6 @@ sddm=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
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
|
# Install SDDM and SDDM theme
|
||||||
printf "${NOTE} Installing sddm and dependencies........\n"
|
printf "${NOTE} Installing sddm and dependencies........\n"
|
||||||
for package in "${sddm[@]}"; do
|
for package in "${sddm[@]}"; do
|
||||||
install_package "$package" 2>&1 | tee -a "$LOG"
|
install_package "$package" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $package Package installation failed, Please check the installation logs"; exit 1; }
|
done
|
||||||
done
|
|
||||||
|
|
||||||
# Check if other login managers installed and disabling its service before enabling sddm
|
# 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
|
if pacman -Qs "$login_manager" > /dev/null; then
|
||||||
echo "disabling $login_manager..."
|
echo "disabling $login_manager..."
|
||||||
sudo systemctl disable "$login_manager.service" 2>&1 | tee -a "$LOG"
|
sudo systemctl disable "$login_manager.service" 2>&1 | tee -a "$LOG"
|
||||||
|
echo "$login_manager disabled."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating sddm service........\n"
|
printf " Activating sddm service........\n"
|
||||||
sudo systemctl enable sddm
|
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
|
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"; }
|
[ ! -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}
|
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
|
|
||||||
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 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Thunar #
|
# Thunar #
|
||||||
|
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
thunar=(
|
thunar=(
|
||||||
thunar
|
thunar
|
||||||
thunar-volman
|
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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
|
||||||
|
|
||||||
# Thunar
|
# Thunar
|
||||||
printf "${NOTE} Installing Thunar Packages...\n"
|
printf "${INFO} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n"
|
||||||
for THUNAR in "${thunar[@]}"; do
|
for THUNAR in "${thunar[@]}"; do
|
||||||
install_package "$THUNAR" 2>&1 | tee -a "$LOG"
|
install_package "$THUNAR" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $THUNAR Package installation failed, Please check the installation logs"; exit 1; }
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# Check for existing configs and copy if does not exist
|
# Check for existing configs and copy if does not exist
|
||||||
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 "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
|
||||||
|
|
||||||
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
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# XDG-Desktop-Portals #
|
# XDG-Desktop-Portals hyprland #
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
xdg=(
|
xdg=(
|
||||||
xdg-desktop-portal-hyprland
|
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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
|
||||||
|
|
||||||
# XDG-DESKTOP-PORTAL-HYPRLAND
|
# XDG-DESKTOP-PORTAL-HYPRLAND
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n"
|
||||||
for xdgs in "${xdg[@]}"; do
|
for xdgs in "${xdg[@]}"; do
|
||||||
install_package "$xdgs" 2>&1 | tee -a "$LOG"
|
install_package "$xdgs" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $xdph Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "${NOTE} Checking for other XDG-Desktop-Portal-Implementations....\n"
|
printf "\n%.0s" {1..2}
|
||||||
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
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# Yay AUR Helper #
|
# Yay AUR Helper #
|
||||||
# NOTE: If paru is already installed, yay will not be installed #
|
# 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! ##
|
## 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
|
# 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)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
MAGENTA=$(tput setaf 5)
|
MAGENTA="$(tput setaf 5)"
|
||||||
WARNING=$(tput setaf 1)
|
ORANGE="$(tput setaf 214)"
|
||||||
YELLOW=$(tput setaf 3)
|
WARNING="$(tput setaf 1)"
|
||||||
RESET=$(tput sgr0)
|
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
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
mkdir Install-Logs
|
mkdir Install-Logs
|
||||||
fi
|
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
|
# Check for AUR helper and install if not found
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
if [ -n "$ISAUR" ]; then
|
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
|
else
|
||||||
printf "\n%s - AUR helper was NOT located\n" "$WARN"
|
printf "\n%s - Installing ${SKY_BLUE}$pkg${RESET} from AUR\n" "${NOTE}"
|
||||||
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; }
|
# Check if folder exists and remove it
|
||||||
cd yay || { printf "%s - Failed to enter yay directory\n" "${ERROR}"; exit 1; }
|
if [ -d "$pkg" ]; then
|
||||||
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install yay from AUR\n" "${ERROR}"; exit 1; }
|
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
|
# moving install logs in to Install-Logs folder
|
||||||
mv install*.log ../Install-Logs/ || true
|
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; }
|
$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
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# zsh and oh my zsh including pokemon-color-scripts#
|
# zsh and oh my zsh#
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
zsh=(
|
zsh_pkg=(
|
||||||
eza
|
eza
|
||||||
zsh
|
zsh
|
||||||
zsh-completions
|
zsh-completions
|
||||||
fzf
|
fzf
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
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
|
# 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"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log"
|
||||||
|
|
||||||
## Optional Pokemon color scripts
|
# Installing core zsh packages
|
||||||
while true; do
|
printf "\n%s - Installing ${SKY_BLUE}zsh packages${RESET} .... \n" "${NOTE}"
|
||||||
if [[ -z $pokemon_choice ]]; then
|
for ZSH in "${zsh_pkg[@]}"; do
|
||||||
read -p "${CAT} OPTIONAL - Do you want to add Pokemon color scripts? (y/n): " pokemon_choice
|
install_package "$ZSH" "$LOG"
|
||||||
fi
|
done
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
# 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 ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n"
|
||||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||||
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true
|
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true
|
||||||
else
|
else
|
||||||
echo "Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
# Check if the directories exist before cloning the repositories
|
# Check if the directories exist before cloning the repositories
|
||||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
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
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true
|
||||||
else
|
else
|
||||||
echo "Directory zsh-autosuggestions already exists. Skipping cloning." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory zsh-autosuggestions already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
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
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true
|
||||||
else
|
else
|
||||||
echo "Directory zsh-syntax-highlighting already exists. Skipping cloning." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory zsh-syntax-highlighting already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
|
# Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
|
||||||
if [ -f "$HOME/.zshrc" ]; then
|
if [ -f "$HOME/.zshrc" ]; then
|
||||||
cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
|
cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.zprofile" ]; then
|
if [ -f "$HOME/.zprofile" ]; then
|
||||||
cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
|
cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copying the preconfigured zsh themes and profile
|
# Copying the preconfigured zsh themes and profile
|
||||||
cp -r 'assets/.zshrc' ~/
|
cp -r 'assets/.zshrc' ~/
|
||||||
cp -r 'assets/.zprofile' ~/
|
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
|
while ! chsh -s $(which zsh); do
|
||||||
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
|
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
printf "${NOTE} Shell changed successfully to zsh.\n" 2>&1 | tee -a "$LOG"
|
printf "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
fi
|
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}
|
||||||
209
install.sh
209
install.sh
@@ -1,29 +1,48 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# https://github.com/JaKooLit
|
# https://github.com/JaKooLit
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
# Set some colors for output messages
|
# Set some colors for output messages
|
||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
MAGENTA=$(tput setaf 5)
|
MAGENTA="$(tput setaf 5)"
|
||||||
WARNING=$(tput setaf 1)
|
ORANGE="$(tput setaf 214)"
|
||||||
YELLOW=$(tput setaf 3)
|
WARNING="$(tput setaf 1)"
|
||||||
RESET=$(tput sgr0)
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
|
||||||
# Check if running as root. If root, script will exit
|
# Check if running as root. If root, script will exit
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
echo "$ERROR This script should not be executed as root! Exiting......."
|
echo "${ERROR} This script should ${WARNING}NOT${RESET} be executed as root!! Exiting......."
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
# Check if --preset argument is provided
|
||||||
|
if [[ "$1" == "--preset" ]]; then
|
||||||
|
|
||||||
|
# nvidia
|
||||||
|
if [[ "$2" == "--nvidia" ]]; then
|
||||||
|
sed -i 's/^nvidia=".*"/nvidia="Y"/' preset.sh
|
||||||
|
sed -i 's/^nouveau=".*"/nouveau="Y"/' preset.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
source ./preset.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if PulseAudio package is installed
|
# Check if PulseAudio package is installed
|
||||||
if pacman -Qq | grep -qw '^pulseaudio$'; then
|
if pacman -Qq | grep -qw '^pulseaudio$'; then
|
||||||
echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')."
|
echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')."
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -33,7 +52,7 @@ if pacman -Q base-devel &> /dev/null; then
|
|||||||
else
|
else
|
||||||
echo "$NOTE Install base-devel.........."
|
echo "$NOTE Install base-devel.........."
|
||||||
|
|
||||||
if sudo pacman -S --noconfirm --needed base-devel; then
|
if sudo pacman -S --noconfirm base-devel; then
|
||||||
echo "$OK base-devel has been installed successfully."
|
echo "$OK base-devel has been installed successfully."
|
||||||
else
|
else
|
||||||
echo "$ERROR base-devel not found nor cannot be installed."
|
echo "$ERROR base-devel not found nor cannot be installed."
|
||||||
@@ -44,41 +63,40 @@ fi
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
printf "\n%.0s" {1..3}
|
|
||||||
echo " | _. |/ _ _ | o _|_ "
|
|
||||||
echo " \_| (_| o |\ (_) (_) |_ | |_ "
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..2}
|
||||||
|
echo -e "\e[35m
|
||||||
|
╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
|
||||||
|
╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ 2025
|
||||||
|
╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘
|
||||||
|
\e[0m"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Welcome message
|
# Welcome message
|
||||||
echo "$(tput setaf 6)Welcome to JaKooLit's Arch-Hyprland Install Script!$(tput sgr0)"
|
echo "${SKY_BLUE}Welcome to JaKooLit's Arch-Hyprland Install Script!${RESET}"
|
||||||
echo
|
echo
|
||||||
echo "$(tput setaf 166)ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) $(tput sgr0)"
|
echo "${WARNING}ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) ${RESET}"
|
||||||
echo
|
echo
|
||||||
echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation! $(tput sgr0)"
|
echo "${YELLOW}NOTE: You will be required to answer some questions during the installation! ${RESET}"
|
||||||
echo
|
echo
|
||||||
echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! $(tput sgr0)"
|
echo "${YELLOW}NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! ${RESET}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
|
read -p "${SKY_BLUE}Would you like to proceed? (y/n): ${RESET}" proceed
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
|
||||||
|
|
||||||
if [ "$proceed" != "y" ]; then
|
if [ "$proceed" != "y" ]; then
|
||||||
echo "Installation aborted."
|
printf "\n%.0s" {1..2}
|
||||||
printf "\n%.0s" {1..2}
|
echo "${INFO} Installation aborted. ${SKY_BLUE}No changes in your system.${RESET} ${YELLOW}Goodbye!${RESET}"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
echo "$(tput bold)$(tput setaf 166)ATTENTION: Choosing Y on use preset question will install also nvidia stuff! $(tput sgr0)"
|
# install pciutils if detected not installed. Necessary for detecting GPU
|
||||||
echo "$(tput bold)$(tput setaf 3)CTRL C to cancel and edit the file preset.sh $(tput sgr0)"
|
if ! pacman -Qs pciutils > /dev/null; then
|
||||||
echo "$(tput bold)$(tput setaf 7)If you are not sure what to do, answer N in here $(tput sgr0)"
|
echo "pciutils is not installed. Installing..."
|
||||||
read -p "$(tput setaf 6)Would you like to Use Preset Settings (See note above)? (y/n): $(tput sgr0)" use_preset
|
sudo pacman -S --noconfirm pciutils
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
# Use of Preset Settings
|
|
||||||
if [[ $use_preset = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Function to colorize prompts
|
# Function to colorize prompts
|
||||||
@@ -91,17 +109,6 @@ colorize_prompt() {
|
|||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="install-$(date +%d-%H%M%S).log"
|
LOG="install-$(date +%d-%H%M%S).log"
|
||||||
|
|
||||||
# Initialize variables to store user responses
|
|
||||||
# aur_helper=""
|
|
||||||
# bluetooth=""
|
|
||||||
# dots=""
|
|
||||||
# gtk_themes=""
|
|
||||||
# nvidia=""
|
|
||||||
# rog=""
|
|
||||||
# sddm=""
|
|
||||||
# thunar=""
|
|
||||||
# xdph=""
|
|
||||||
# zsh=""
|
|
||||||
|
|
||||||
# Create Directory for Install Logs
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
@@ -172,32 +179,77 @@ execute_script() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Collect user responses to all questions
|
# Collect user responses to all questions
|
||||||
|
# Check if nvidia is present
|
||||||
|
if lspci | grep -i "nvidia" &> /dev/null; then
|
||||||
|
printf "\n"
|
||||||
|
printf "${INFO} ${YELLOW}NVIDIA GPU${RESET} detected in your system \n"
|
||||||
|
printf "${NOTE} Script will install ${YELLOW}nvidia-dkms nvidia-utils and nvidia-settings${RESET} \n"
|
||||||
|
ask_yes_no "-Do you want script to configure ${YELLOW}NVIDIA${RESET} for you?" nvidia
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$nvidia" == "Y" ]]; then
|
||||||
|
ask_yes_no "-Would you like to ${YELLOW}blacklist nouveau?${RESET}" nouveau
|
||||||
|
fi
|
||||||
|
|
||||||
|
# AUR helper
|
||||||
|
if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then
|
||||||
|
printf "\n"
|
||||||
|
ask_custom_option "-Which ${YELLOW}AUR helper${RESET} would you like to use? (paru or yay): " "paru or yay" aur_helper
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_custom_option "-Type AUR helper" "paru or yay" aur_helper
|
ask_yes_no "-Install ${YELLOW}GTK themes${RESET} (required for Dark/Light function)?" gtk_themes
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Do you have any nvidia gpu in your system?" nvidia
|
ask_yes_no "-Do you want to configure ${YELLOW}Bluetooth${RESET}?" bluetooth
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Install GTK themes (required for Dark/Light function)?" gtk_themes
|
ask_yes_no "-Do you want to install ${YELLOW}Thunar file manager${RESET}?" thunar
|
||||||
|
|
||||||
|
if [[ "$thunar" == "Y" ]]; then
|
||||||
|
ask_yes_no "-Set ${YELLOW}Thunar${RESET} as the default file manager?" thunar_choice
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Input group
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Do you want to configure Bluetooth?" bluetooth
|
if ! groups "$(whoami)" | grep -q '\binput\b'; then
|
||||||
|
printf "${NOTE} adding to ${YELLOW}input${RESET} group might be necessary for ${YELLOW}waybar keyboard-state functionality${RESET} \n"
|
||||||
|
ask_yes_no "-Would you like to be added to the ${YELLOW}input${RESET} group?" input_group
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Do you want to install Thunar file manager?" thunar
|
printf "${NOTE} ${YELLOW}AGS Desktop Overview DEMO link${RESET} on README\n"
|
||||||
|
ask_yes_no "-Install ${YELLOW}AGS (aylur's GTK shell) v1${RESET} for Desktop-Like Overview?" ags
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Install AGS (aylur's gtk shell) v1 for Desktop Like Overview?" ags
|
ask_yes_no "-Install & configure ${YELLOW}SDDM${RESET} as login manager?" sddm
|
||||||
|
|
||||||
|
if [[ "$sddm" == "Y" ]]; then
|
||||||
|
ask_yes_no "-Download and Install ${YELLOW}SDDM Theme?${RESET} " sddm_theme
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Install & configure SDDM log-in Manager plus (OPTIONAL) SDDM Theme?" sddm
|
ask_yes_no "-Install ${YELLOW}XDG-DESKTOP-PORTAL-HYPRLAND?${RESET} (For proper Screen Share, e.g., OBS)" xdph
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)" xdph
|
ask_yes_no "-Install ${YELLOW}zsh${RESET} with ${YELLOW}oh-my-zsh?${RESET}" zsh
|
||||||
|
|
||||||
|
if [[ "$zsh" == "Y" ]]; then
|
||||||
|
ask_yes_no "-Add ${YELLOW}Pokemon color scripts?${RESET} in your terminal?" pokemon_choice
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Install zsh, oh-my-zsh & (Optional) pokemon-colorscripts?" zsh
|
ask_yes_no "-Installing on ${YELLOW}Asus ROG laptops?${RESET}" rog
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
ask_yes_no "-Installing in a Asus ROG Laptops?" rog
|
ask_yes_no "-Do you want to add pre-configured ${YELLOW}KooL's Hyprland dotfiles?${RESET}" dots
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Do you want to download pre-configured Hyprland dotfiles?" dots
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
|
|
||||||
# Ensuring all in the scripts folder are made executable
|
# Ensuring all in the scripts folder are made executable
|
||||||
chmod +x install-scripts/*
|
chmod +x install-scripts/*
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
# Ensuring base-devel is installed
|
# Ensuring base-devel is installed
|
||||||
execute_script "00-base.sh"
|
execute_script "00-base.sh"
|
||||||
@@ -226,6 +278,9 @@ execute_script "hyprland.sh"
|
|||||||
if [ "$nvidia" == "Y" ]; then
|
if [ "$nvidia" == "Y" ]; then
|
||||||
execute_script "nvidia.sh"
|
execute_script "nvidia.sh"
|
||||||
fi
|
fi
|
||||||
|
if [ "$nouveau" == "Y" ]; then
|
||||||
|
execute_script "nvidia_nouveau.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$gtk_themes" == "Y" ]; then
|
if [ "$gtk_themes" == "Y" ]; then
|
||||||
execute_script "gtk_themes.sh"
|
execute_script "gtk_themes.sh"
|
||||||
@@ -238,6 +293,10 @@ fi
|
|||||||
if [ "$thunar" == "Y" ]; then
|
if [ "$thunar" == "Y" ]; then
|
||||||
execute_script "thunar.sh"
|
execute_script "thunar.sh"
|
||||||
fi
|
fi
|
||||||
|
if [ "$thunar_choice" == "Y" ]; then
|
||||||
|
execute_script "thunar_default.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$ags" == "Y" ]; then
|
if [ "$ags" == "Y" ]; then
|
||||||
execute_script "ags.sh"
|
execute_script "ags.sh"
|
||||||
fi
|
fi
|
||||||
@@ -245,6 +304,9 @@ fi
|
|||||||
if [ "$sddm" == "Y" ]; then
|
if [ "$sddm" == "Y" ]; then
|
||||||
execute_script "sddm.sh"
|
execute_script "sddm.sh"
|
||||||
fi
|
fi
|
||||||
|
if [ "$sddm_theme" == "Y" ]; then
|
||||||
|
execute_script "sddm_theme.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$xdph" == "Y" ]; then
|
if [ "$xdph" == "Y" ]; then
|
||||||
execute_script "xdph.sh"
|
execute_script "xdph.sh"
|
||||||
@@ -253,8 +315,13 @@ fi
|
|||||||
if [ "$zsh" == "Y" ]; then
|
if [ "$zsh" == "Y" ]; then
|
||||||
execute_script "zsh.sh"
|
execute_script "zsh.sh"
|
||||||
fi
|
fi
|
||||||
|
if [ "$pokemon_choice" == "Y" ]; then
|
||||||
|
execute_script "zsh_pokemon.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
execute_script "InputGroup.sh"
|
if [ "$input_group" == "Y" ]; then
|
||||||
|
execute_script "InputGroup.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$rog" == "Y" ]; then
|
if [ "$rog" == "Y" ]; then
|
||||||
execute_script "rog.sh"
|
execute_script "rog.sh"
|
||||||
@@ -279,25 +346,41 @@ printf "\n%.0s" {1..1}
|
|||||||
|
|
||||||
# Check if hyprland or hyprland-git is installed
|
# Check if hyprland or hyprland-git is installed
|
||||||
if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then
|
if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then
|
||||||
printf "\n${OK} Hyprland is installed. However, some essential packages may not be installed Please see above!"
|
printf "\n${OK} Hyprland is installed. However, some essential packages may not be installed. Please see above!"
|
||||||
printf "\n${CAT} Ignore this message if it states 'All essential packages are installed.'\n"
|
printf "\n${CAT} Ignore this message if it states ${YELLOW}All essential packages${RESET} are installed as per above\n"
|
||||||
sleep 2
|
sleep 2
|
||||||
printf "\n${NOTE} You can start Hyprland by typing 'Hyprland' (IF SDDM is not installed) (note the capital H!).\n"
|
printf "\n%.0s" {1..2}
|
||||||
printf "\n${NOTE} However, it is highly recommended to reboot your system.\n\n"
|
|
||||||
|
printf "${SKY_BLUE}Thank you${RESET} for using ${MAGENTA}KooL's Hyprland Dots${RESET}. ${YELLOW}Enjoy and Have a good day!${RESET}"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
printf "\n${NOTE} You can start Hyprland by typing ${SKY_BLUE}Hyprland${RESET} (IF SDDM is not installed) (note the capital H!).\n"
|
||||||
|
printf "\n${NOTE} However, it is ${YELLOW}highly recommended to reboot${RESET} your system.\n\n"
|
||||||
|
|
||||||
# Prompt user to reboot
|
|
||||||
read -rp "${CAT} Would you like to reboot now? (y/n): " HYP
|
read -rp "${CAT} Would you like to reboot now? (y/n): " HYP
|
||||||
|
|
||||||
# Check if the user answered 'y' or 'Y'
|
HYP=$(echo "$HYP" | tr '[:upper:]' '[:lower:]')
|
||||||
if [[ "$HYP" =~ ^[Yy]$ ]]; then
|
|
||||||
if [[ "$nvidia" == "Y" ]]; then
|
if [[ "$HYP" == "y" || "$HYP" == "yes" ]]; then
|
||||||
echo "${NOTE} NVIDIA GPU detected. Rebooting the system..."
|
echo "${INFO} Rebooting now..."
|
||||||
|
systemctl reboot
|
||||||
|
elif [[ "$HYP" == "n" || "$HYP" == "no" ]]; then
|
||||||
|
echo "${OK} You choose NOT to reboot"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
# Check if NVIDIA GPU is present
|
||||||
|
if lspci | grep -i "nvidia" &> /dev/null; then
|
||||||
|
echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
fi
|
fi
|
||||||
systemctl reboot
|
else
|
||||||
|
echo "${WARN} Invalid response. Please answer with 'y' or 'n'. Exiting."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Print error message if neither package is installed
|
# Print error message if neither package is installed
|
||||||
printf "\n${WARN} Hyprland failed to install. Please check 00_CHECK-time_installed.log and other files Install-Logs/ directory...\n\n"
|
printf "\n${WARN} Hyprland is NOT installed. Please check 00_CHECK-time_installed.log and other files in the Install-Logs/ directory..."
|
||||||
|
printf "\n%.0s" {1..3}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
66
preset.sh
66
preset.sh
@@ -1,51 +1,55 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
#
|
|
||||||
# CREDIT to: https://github.com/PostCyberPunk for this Preset function
|
# CREDIT to: https://github.com/PostCyberPunk for this Preset function
|
||||||
|
|
||||||
## -- Make sure you use the right answer or install script will fail ###
|
## -- Make sure you use the right answer or install script will fail ###
|
||||||
# Make sure proper AUR Helper is use NO Upperscript. Either paru or yay only is accepted
|
|
||||||
# The rest Change to Y for Yes and N for No.
|
# The rest Change to Y for Yes and N for No.
|
||||||
|
|
||||||
### -Type AUR helper
|
### Script will install nvidia-dkms nvidia-utils & nvidia-settings
|
||||||
|
###-Would you like script to Configure NVIDIA for you?
|
||||||
|
nvidia="N"
|
||||||
|
### Would you like to blacklist nouveau? (y/n)
|
||||||
|
nouveau="N"
|
||||||
|
|
||||||
### yay or paru
|
### yay or paru
|
||||||
aur_helper="yay"
|
aur_helper="yay"
|
||||||
############ use : "Y" or "N"
|
|
||||||
###-Do you have any nvidia gpu in your system?
|
|
||||||
nvidia="Y"
|
|
||||||
###-Install GTK themes (required for Dark/Light function)?
|
###-Install GTK themes (required for Dark/Light function)?
|
||||||
gtk_themes="Y"
|
gtk_themes="Y"
|
||||||
|
|
||||||
###-Do you want to configure Bluetooth?
|
###-Do you want to configure Bluetooth?
|
||||||
bluetooth="Y"
|
bluetooth="Y"
|
||||||
|
|
||||||
###-Do you want to install Thunar file manager?
|
###-Do you want to install Thunar file manager?
|
||||||
thunar="Y"
|
thunar="Y"
|
||||||
###-Install AGS (aylur's gtk shell) v1 for Desktop Like Overview?" ags
|
### Do you want to set Thunar as the default file manager?
|
||||||
|
thunar_choice="Y"
|
||||||
|
|
||||||
|
|
||||||
|
### Adding user to the 'input' group might be necessary for waybar keyboard-state functionality
|
||||||
|
input_group="Y"
|
||||||
|
|
||||||
|
### Desktop overview Demo Link in README
|
||||||
|
### Desktop overview Demo Link in README
|
||||||
|
### Install AGS (aylur's GTK shell) v1 for Desktop-Like Overview?"
|
||||||
ags="Y"
|
ags="Y"
|
||||||
###-Install & configure SDDM log-in Manager plus (OPTIONAL) SDDM Theme?
|
|
||||||
|
###-Install & configure SDDM log-in Manager
|
||||||
sddm="Y"
|
sddm="Y"
|
||||||
|
### install and download SDDM themes
|
||||||
|
sddm_theme="Y"
|
||||||
|
|
||||||
###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)
|
###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)
|
||||||
xdph="Y"
|
xdph="Y"
|
||||||
###-Install zsh, oh-my-zsh & (Optional) pokemon-colorscripts?
|
|
||||||
zsh="Y"
|
|
||||||
###-Installing in a Asus ROG Laptops?
|
|
||||||
rog="N"
|
|
||||||
###-Do you want to download pre-configured Hyprland dotfiles?
|
|
||||||
dots="Y"
|
|
||||||
|
|
||||||
### These are the sub-questions of the above choices
|
### Shell extension. Bash alternative
|
||||||
### Would you like to blacklist nouveau? (y/n)
|
###-Install zsh, oh-my-zsh
|
||||||
blacklist_nouveau="Y"
|
zsh="Y"
|
||||||
# Ask the user if they want to use Thunar as the default file manager
|
### add Pokemon color scripts to terminal
|
||||||
# Do you want to set Thunar as the default file manager? (y/n): "
|
|
||||||
thunar_default="Y"
|
|
||||||
### XDG-desktop-portal-KDE & GNOME (if installed) should be manually disabled or removed! Script cant remove nor disable it.
|
|
||||||
### Would you like to try to remove other XDG-Desktop-Portal-Implementations? (y/n)
|
|
||||||
XDPH1="Y"
|
|
||||||
### OPTIONAL - Would you like to install SDDM themes? (y/n)
|
|
||||||
install_sddm_theme="Y"
|
|
||||||
### " This script will add your user to the 'input' group."
|
|
||||||
### " Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality."
|
|
||||||
input_group_choid="Y"
|
|
||||||
### OPTIONAL - Do you want to add Pokemon color scripts? (y/n):
|
|
||||||
pokemon_choice="Y"
|
pokemon_choice="Y"
|
||||||
### Do you want to upgrade to the latest version? (y/n) - This is for the dotfiles
|
|
||||||
upgrade_choice="Y"
|
### This will install ASUSCTL & SUPERGFXCTL
|
||||||
|
###-Installing on Asus ROG Laptops?
|
||||||
|
rog="N"
|
||||||
|
|
||||||
|
###-Download and Add pre-configured Hyprland dotfiles?
|
||||||
|
dots="Y"
|
||||||
|
|||||||
Reference in New Issue
Block a user