This commit is contained in:
hesam-init 2024-12-04 22:45:27 +03:30
commit 35852e20db

View file

@ -166,20 +166,19 @@ setup_packages() {
fi fi
} }
setup_groups() { setup_hyprland() {
log "Add user to needed groups..." log "Preparing to install Hyprland and related packages..."
if ! ask_prompt "Do you want to add user to groups"; then
error "Action cancelled..."
if ! ask_prompt "Would you like to proceed with installing Hyprland and related packages?"; then
error "Hyprland installation cancelled."
return 0 return 0
fi fi
for group in "${GROUPS_LIST[@]}"; do log "Adding the Hyprland repository to the package manager..."
sudo usermod -a "$USER" -G "$group" echo 'repository=https://github.com/void-land/hyprland-void-packages/releases/latest/download/' | sudo tee /etc/xbps.d/hyprland-packages.conf
echo "$group" log "Updating package manager (xbps) and installing Hyprland packages..."
done sudo xbps-install -Sy hyprland hyprland-devel aquamarine hyprcursor hypridle hyprland-protocols hyprlang hyprlock hyprpaper hyprutils hyprwayland-scanner xdg-desktop-portal-hyprland
} }
setup_services() { setup_services() {
@ -206,19 +205,20 @@ setup_services() {
done done
} }
setup_hyprland() { setup_groups() {
log "Preparing to install Hyprland and related packages..." log "Add user to needed groups..."
if ! ask_prompt "Do you want to add user to groups"; then
error "Action cancelled..."
if ! ask_prompt "Would you like to proceed with installing Hyprland and related packages? (y/n)"; then
error "Hyprland installation cancelled."
return 0 return 0
fi fi
log "Adding the Hyprland repository to the package manager..." for group in "${GROUPS_LIST[@]}"; do
echo 'repository=https://github.com/void-land/hyprland-void-packages/releases/latest/download/' | sudo tee /etc/xbps.d/hyprland-packages.conf sudo usermod -a "$USER" -G "$group"
log "Updating package manager (xbps) and installing Hyprland packages..." echo "$group"
sudo xbps-install -Sy hyprland hyprland-devel aquamarine hyprcursor hypridle hyprland-protocols hyprlang hyprlock hyprpaper hyprutils hyprwayland-scanner xdg-desktop-portal-hyprland done
} }
setup_fonts() { setup_fonts() {
@ -267,9 +267,9 @@ while getopts "sfh" opt; do
update_xbps update_xbps
update_packages update_packages
setup_packages setup_packages
setup_groups
setup_services
setup_hyprland setup_hyprland
setup_services
setup_groups
setup_fonts setup_fonts
log "Setup is done, reboot your system" log "Setup is done, reboot your system"