feat: hyprland installer for setup shell script

This commit is contained in:
hesam-init 2024-12-04 20:14:30 +03:30
parent d41b22477b
commit 3328adadf9

View file

@ -116,7 +116,7 @@ display_help() {
}
update_xbps() {
log "Update xbps package manager ..."
log "Update xbps package manager..."
if ! ask_prompt "Do you want to update the package manager (xbps)?"; then
error "Action cancelled..."
@ -128,7 +128,7 @@ update_xbps() {
}
update_packages() {
log "Update all packages ..."
log "Update all packages..."
if ! ask_prompt "Do you want to perform a full system update?"; then
error "Action cancelled..."
@ -167,7 +167,7 @@ setup_packages() {
}
setup_groups() {
log "Add user to needed groups"
log "Add user to needed groups..."
if ! ask_prompt "Do you want to add user to groups"; then
error "Action cancelled..."
@ -183,7 +183,7 @@ setup_groups() {
}
setup_services() {
log "Enable services"
log "Enable services..."
if ! ask_prompt "Do you want to enable required services?"; then
error "Action cancelled..."
@ -206,8 +206,23 @@ setup_services() {
done
}
setup_hyprland() {
log "Preparing to install Hyprland and related packages..."
if ! ask_prompt "Would you like to proceed with installing Hyprland and related packages? (y/n)"; then
error "Hyprland installation cancelled."
return 0
fi
log "Adding the Hyprland repository to the package manager..."
echo 'repository=https://github.com/void-land/hyprland-void-packages/releases/latest/download/' | sudo tee /etc/xbps.d/hyprland-packages.conf
log "Updating package manager (xbps) and installing Hyprland packages..."
sudo xbps-install -Sy hyprland hyprland-devel aquamarine hyprcursor hypridle hyprland-protocols hyprlang hyprlock hyprpaper hyprutils hyprwayland-scanner xdg-desktop-portal-hyprland
}
setup_fonts() {
log "Install TTF fonts"
log "Install TTF fonts..."
if ! ask_prompt "Do you want to install TTF fonts?"; then
error "Action cancelled..."
@ -254,6 +269,7 @@ while getopts "sfh" opt; do
setup_packages
setup_groups
setup_services
setup_hyprland
setup_fonts
log "Setup is done, reboot your system"