Skip to content

Commit 39e515f

Browse files
committed
updated since many conflicts
1 parent 6a67a21 commit 39e515f

31 files changed

+664
-595
lines changed

CHANGELOGS.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
## Changelogs
22

3-
## 01 Fed 2025
4-
- added a small scripts in the assets directory to install git and non-git version of hyprland (instruction on the readme)
5-
6-
## 30 Jan 2025
7-
- separate AGS v1 installation separate
3+
## 06 Feb 2025
4+
- added semi-unattended function.
5+
- move all the initial questions at the beginning
6+
7+
## 04 Feb 2025
8+
- Re-coded for better visibility
9+
- Offered a new SDDM theme.
10+
- script will automatically detect if you have nvidia but script still offer if you want to set up for user
811

912
## 29 Jan 2025
1013
- enhanced nvidia.sh to add additional systemd-bootloader entries for nvidia

Installer.png

-1.6 MB
Loading

README.md

+21-19
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
109109
- inside the install-scripts directory, you can edit 00-hypr-pkgs.sh. Care though as the Hyprland Dots may not work properly!
110110

111111
#### 💫 SDDM and GTK Themes offered
112-
- If you opted to install SDDM theme, here's the [`LINK`](https://github.com/JaKooLit/simple-sddm-2)
112+
- 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)
113113
- 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.
114114

115115
#### 👀 NVidia GPU Owners.
@@ -119,12 +119,7 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
119119
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
120120

121121
## ✨ to use this script
122-
> clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
123-
124-
>[!IMPORTANT]
125-
> Make sure you have base-devel installed
126-
127-
- Without base-devel installed, script will fail
122+
- clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
128123

129124
```bash
130125
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland
@@ -136,6 +131,24 @@ chmod +x install.sh
136131
<p align="center">
137132
<img align="center" width="100%" src="https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/Installer.png" />
138133

134+
135+
### 🤟 semi-unattended installation (new for 2025)
136+
- edit preset.sh to modify what packages you want. Make sure to change only with Y or N
137+
- to use preset instead of usual `./install.sh` you can ran like this
138+
139+
```bash
140+
./install.sh --preset
141+
```
142+
143+
- if you have nvidia you can add --nvidia argument
144+
145+
```bash
146+
./install.sh --preset --nvidia
147+
```
148+
149+
- its called semi-unattended it is because you still have to answer some questions when installing KooL's Hyprland Dots
150+
151+
139152
#### ✨ for ZSH and OH-MY-ZSH installation
140153
> installer should auto change your default shell to zsh. However, if it does not, do this
141154
```bash
@@ -171,16 +184,11 @@ source ~/.zshrc
171184
- CD into Arch-Hyprland directory and then ran the below command.
172185
- i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or
173186
- `./install-scripts/sddm.sh` - For reinstall sddm
174-
175187
> [!IMPORTANT]
176188
> DO NOT cd into install-scripts directory as script will most likely to fail
177189
178-
#### 🎞️ AGS Overview DEMO
179-
- in case you wonder, here is a short demo of AGS overview [Youtube LINK](https://youtu.be/zY5SLNPBJTs)
180-
181190
#### 🛣️ Roadmap:
182-
- ~~[ ] Install zsh and oh-my-zsh without necessary steps above~~ DONE
183-
- [ ] possibly adding gruvbox themes, cursors, icons
191+
- [ ] show a progress bar in downloading and compiling part when installing outside AUR or official repo
184192

185193
#### ❗ some known issues for nvidia
186194
- 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
218226
#### 🫥 Improving performance for Older Nvidia Cards using driver 470
219227
- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
220228

221-
222-
#### ➕ Added Hyprland install either git or non-git version
223-
- on assets directory of Arch-Hyprland, you will find install scripts to assist in switching non-git and git version of hyprland
224-
- pretty straight forward `chmod +x actions.sh` `./actions.sh` and `1 for non-git` and `2 for git version`
225-
226-
227229
#### 📒 Final Notes
228230
- join my discord channel [`Discord`](https://discord.com/invite/9JEgZsfhex)
229231
- 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 :)

assets/sddm.png

1010 KB
Loading

install-scripts/00-base.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_base.log"
1414

1515

1616
# Installation of main components
17-
printf "\n%s - Installing base-devel \n" "${NOTE}"
17+
printf "\n%s - Installing ${SKY_BLUE}base-devel${RESET} \n" "${NOTE}"
1818

1919
for PKG1 in "${base[@]}"; do
20-
sudo pacman -S --noconfirm "$PKG1" | tee -a "$LOG"
20+
install_package_pacman "$PKG1" "$LOG"
2121
done
2222

23-
clear
23+
printf "\n%.0s" {1..2}

install-scripts/01-hypr-pkgs.sh

+8-13
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ uninstall=(
7777
cachyos-hyprland-settings
7878
rofi
7979
wallust-git
80+
rofi-lbonn-wayland
81+
rofi-lbonn-wayland-git
8082
)
8183

8284
## 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"
9294
# Set the name of the log file to include the current date and time
9395
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log"
9496

95-
# uninstalling conflicting packages
96-
# Initialize a variable to track overall errors
97+
# conflicting packages removal
9798
overall_failed=0
98-
99-
printf "\n%s - Removing Mako, Dunst, and rofi as they conflict with swaync and rofi-wayland \n" "${NOTE}"
99+
printf "\n%s - ${SKY_BLUE}Removing some packages${RESET} as it conflicts with KooL's Hyprland Dots \n" "${NOTE}"
100100
for PKG in "${uninstall[@]}"; do
101101
uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
102102
if [ $? -ne 0 ]; then
103-
# Track if any uninstallation failed
104103
overall_failed=1
105104
fi
106105
done
@@ -109,17 +108,13 @@ if [ $overall_failed -ne 0 ]; then
109108
echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
110109
fi
111110

111+
printf "\n%.0s" {1..1}
112112

113113
# Installation of main components
114-
printf "\n%s - Installing hyprland packages.... \n" "${NOTE}"
114+
printf "\n%s - Installing ${SKY_BLUE}KooL's hyprland necessary packages${RESET} .... \n" "${NOTE}"
115115

116116
for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do
117-
install_package "$PKG1" 2>&1 | tee -a "$LOG"
118-
if [ $? -ne 0 ]; then
119-
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
120-
exit 1
121-
fi
117+
install_package "$PKG1" "$LOG"
122118
done
123119

124-
clear
125-
120+
printf "\n%.0s" {1..2}

install-scripts/02-Final-Check.sh

+8-9
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
4040
# Set the name of the log file to include the current date and time
4141
LOG="Install-Logs/00_CHECK-$(date +%d-%H%M%S)_installed.log"
4242

43-
printf "\n%s - Final Check if Essential packages were installed \n" "${NOTE}"
43+
printf "\n%s - Final Check if all ${SKY_BLUE}Essential packages${RESET} were installed \n" "${NOTE}"
4444
# Initialize an empty array to hold missing packages
4545
missing=()
4646
local_missing=()
4747

48-
# Function to check if a package is installed using pacman
48+
# Function to check if a packages are installed using pacman
4949
is_installed_pacman() {
5050
pacman -Qi "$1" &>/dev/null
5151
}
5252

5353
# Loop through each package
5454
for pkg in "${packages[@]}"; do
55-
# Check if the package is installed via pacman
55+
# Check if the packages are installed
5656
if ! is_installed_pacman "$pkg"; then
5757
missing+=("$pkg")
5858
fi
@@ -67,25 +67,24 @@ done
6767

6868
# Log missing packages
6969
if [ ${#missing[@]} -eq 0 ] && [ ${#local_missing[@]} -eq 0 ]; then
70-
echo "${OK} All essential packages are installed." | tee -a "$LOG"
70+
echo "${OK} GREAT! It seems All ${YELLOW}essential packages${RESET} are installed." | tee -a "$LOG"
7171
else
7272
if [ ${#missing[@]} -ne 0 ]; then
7373
echo "${WARN} The following packages are not installed and will be logged:"
7474
for pkg in "${missing[@]}"; do
75-
echo "$pkg"
76-
echo "$pkg" >> "$LOG" # Log the missing package to the file
75+
echo "${WARNING}$pkg${RESET}"
76+
echo "$pkg" >> "$LOG"
7777
done
7878
fi
7979

8080
if [ ${#local_missing[@]} -ne 0 ]; then
8181
echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
8282
for pkg1 in "${local_missing[@]}"; do
83-
echo "$pkg1 is not installed. Can't find it in /usr/local/bin/"
84-
echo "$pkg1" >> "$LOG" # Log the missing local package to the file
83+
echo "${WARNING}$pkg1${REST} is not installed. Can't find it in /usr/local/bin/"
84+
echo "$pkg1" >> "$LOG"
8585
done
8686
fi
8787

88-
# Add a timestamp when the missing packages were logged
8988
echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
9089
fi
9190

install-scripts/Global_functions.sh

+67-39
Original file line numberDiff line numberDiff line change
@@ -8,80 +8,108 @@ set -e
88
OK="$(tput setaf 2)[OK]$(tput sgr0)"
99
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
1010
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
11+
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
1112
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
1213
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
13-
MAGENTA=$(tput setaf 5)
14-
WARNING=$(tput setaf 1)
15-
YELLOW=$(tput setaf 3)
16-
RESET=$(tput sgr0)
17-
14+
MAGENTA="$(tput setaf 5)"
15+
ORANGE="$(tput setaf 214)"
16+
WARNING="$(tput setaf 1)"
17+
YELLOW="$(tput setaf 3)"
18+
GREEN="$(tput setaf 2)"
19+
BLUE="$(tput setaf 4)"
20+
SKY_BLUE="$(tput setaf 6)"
21+
RESET="$(tput sgr0)"
1822

1923
# Create Directory for Install Logs
2024
if [ ! -d Install-Logs ]; then
2125
mkdir Install-Logs
2226
fi
2327

24-
# Function for installing packages
28+
# Show progress function
29+
show_progress() {
30+
local pid=$1
31+
local package_name=$2
32+
local spin_chars=("●○○○○○○○○○" "○●○○○○○○○○" "○○●○○○○○○○" "○○○●○○○○○○" "○○○○●○○○○" \
33+
"○○○○○●○○○○" "○○○○○○●○○○" "○○○○○○○●○○" "○○○○○○○○●○" "○○○○○○○○○●")
34+
local i=0
35+
36+
tput civis
37+
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} ..." "$package_name"
38+
39+
while ps -p $pid &> /dev/null; do
40+
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} %s" "$package_name" "${spin_chars[i]}"
41+
i=$(( (i + 1) % 10 ))
42+
sleep 0.3
43+
done
44+
45+
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} ... Done!%-20s \n" "$package_name" ""
46+
tput cnorm
47+
}
48+
49+
50+
51+
# Function to install packages with pacman
2552
install_package_pacman() {
26-
# Checking if package is already installed
53+
# Check if package is already installed
2754
if pacman -Q "$1" &>/dev/null ; then
28-
echo -e "${OK} $1 is already installed. Skipping..."
55+
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
2956
else
30-
# Package not installed
31-
echo -e "${NOTE} Installing $1 ..."
32-
sudo pacman -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
33-
# Making sure package is installed
57+
# Run pacman and redirect all output to a log file
58+
(
59+
stdbuf -oL sudo pacman -S --noconfirm "$1" 2>&1
60+
) >> "$LOG" 2>&1 &
61+
PID=$!
62+
show_progress $PID "$1"
63+
64+
# Double check if package is installed
3465
if pacman -Q "$1" &>/dev/null ; then
35-
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
66+
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
3667
else
37-
# Something is missing, exiting to review log
38-
echo -e "${ERROR} $1 failed to install. Please check the $LOG. You may need to install manually."
39-
exit 1
68+
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the $LOG. You may need to install manually."
4069
fi
4170
fi
4271
}
4372

44-
4573
ISAUR=$(command -v yay || command -v paru)
4674

47-
# Function for installing packages
75+
# Function to install packages with either yay or paru
4876
install_package() {
49-
# Checking if package is already installed
5077
if $ISAUR -Q "$1" &>> /dev/null ; then
51-
echo -e "${OK} $1 is already installed. Skipping..."
78+
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
5279
else
53-
# Package not installed
54-
echo -e "${NOTE} Installing $1 ..."
55-
$ISAUR -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
56-
# Making sure package is installed
80+
(
81+
stdbuf -oL $ISAUR -S --noconfirm "$1" 2>&1
82+
) >> "$LOG" 2>&1 &
83+
PID=$!
84+
show_progress $PID "$1"
85+
86+
# Double check if package is installed
5787
if $ISAUR -Q "$1" &>> /dev/null ; then
58-
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
88+
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
5989
else
6090
# Something is missing, exiting to review log
61-
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 :("
62-
exit 1
91+
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 :("
6392
fi
6493
fi
6594
}
6695

67-
# Function for uninstalling packages
96+
# Function for removing packages
6897
uninstall_package() {
6998
local pkg="$1"
7099

71100
# Checking if package is installed
72-
if pacman -Qi "$pkg" &>> /dev/null ; then
73-
# Package is installed
74-
echo -e "${NOTE} Uninstalling $pkg ..."
101+
if pacman -Qi "$pkg" &>/dev/null; then
102+
echo -e "${NOTE} removing $pkg ..."
75103
sudo pacman -R --noconfirm "$pkg" 2>&1 | tee -a "$LOG" | grep -v "error: target not found"
76-
# Check if the package was uninstalled
77-
if ! pacman -Qi "$pkg" &>> /dev/null ; then
78-
echo -e "\e[1A\e[K${OK} $pkg was uninstalled."
104+
105+
if ! pacman -Qi "$pkg" &>/dev/null; then
106+
echo -e "\e[1A\e[K${OK} $pkg removed."
79107
else
80-
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall. Please check the log."
81-
return 1
108+
echo -e "\e[1A\e[K${ERROR} $pkg Removal failed. No actions required."
109+
return 1
82110
fi
83111
else
84-
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
112+
echo -e "${INFO} Package $pkg not installed, skipping."
85113
fi
86-
return 0
87-
}
114+
return 0
115+
}

0 commit comments

Comments
 (0)