diff options
Diffstat (limited to 'archsetup')
| -rwxr-xr-x | archsetup | 94 |
1 files changed, 93 insertions, 1 deletions
@@ -119,6 +119,7 @@ load_config() { [[ -n "$DOTEMACS_REPO" ]] && dotemacs_repo="$DOTEMACS_REPO" [[ -n "$ARCHSETUP_REPO" ]] && archsetup_repo="$ARCHSETUP_REPO" [[ -n "$LOCALE" ]] && locale="$LOCALE" + [[ -n "$DESKTOP_ENV" ]] && desktop_env="$DESKTOP_ENV" } # Load config if specified @@ -130,6 +131,7 @@ load_config() { username="${username:-cjennings}" password="${password:-welcome}" # CHANGE ON FIRST LOGIN locale="${locale:-}" # set via prompt if not configured +desktop_env="${desktop_env:-hyprland}" # options: dwm, hyprland, none archsetup_dir="$(dirname "$(readlink -f "$0")")" dotfiles_dir="$archsetup_dir/dotfiles" @@ -155,8 +157,9 @@ error_messages=() errors_encountered=0 # Installation steps (single source of truth for show_status and main execution) +# display_server and window_manager steps are conditional based on $desktop_env STEPS=(intro prerequisites create_user user_customizations aur_installer - essential_services xorg dwm desktop_environment developer_workstation + essential_services display_server window_manager desktop_environment developer_workstation supplemental_software boot_ux) ### Cleanup Trap @@ -780,6 +783,13 @@ user_customizations() { (cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt system \ >> "$logfile" 2>&1 ) || error_warn "$action" "$?" + # Stow desktop-environment-specific dotfiles + if [[ "$desktop_env" == "hyprland" ]]; then + action="linking hyprland dotfiles" && display "task" "$action" + (cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt hyprland \ + >> "$logfile" 2>&1 ) || error_warn "$action" "$?" + fi + # install desktop-file-utils before updating database (provides update-desktop-database) pacman_install desktop-file-utils @@ -1236,6 +1246,88 @@ dwm() { aur_install pinentry-dmenu # password entry that leverages dmenu } +### Wayland Display Server +wayland() { + action="Wayland Display Server" && display "subtitle" "$action" + for software in wayland wayland-protocols xorg-xwayland wl-clipboard; do + pacman_install "$software" + done + + # Portal for screen sharing, file dialogs, etc. + action="XDG Desktop Portal" && display "subtitle" "$action" + pacman_install xdg-desktop-portal + pacman_install xdg-desktop-portal-gtk + aur_install xdg-desktop-portal-hyprland + + # Install GPU-specific drivers + install_gpu_drivers +} + +### Hyprland Window Manager +hyprland() { + action="Hyprland Compositor Dependencies" && display "subtitle" "$action" + for software in polkit-kde-agent qt5-wayland qt6-wayland; do + pacman_install "$software" + done + + action="Hyprland Compositor" && display "subtitle" "$action" + pacman_install hyprland + pacman_install hypridle + pacman_install hyprlock + pacman_install hyprpaper + + action="Hyprland Utilities" && display "subtitle" "$action" + pacman_install waybar # status bar + pacman_install wofi # app launcher + pacman_install swww # wallpaper + pacman_install grim # screenshot + pacman_install slurp # region select + pacman_install gammastep # night light (replaces redshift) + pacman_install brightnessctl # brightness control + pacman_install pamixer # audio control + + # st terminal still works on Wayland via XWayland + git_install "$st_repo" +} + +### Display Server (conditional) +display_server() { + display "title" "Display Server" + case "$desktop_env" in + dwm) + xorg + ;; + hyprland) + wayland + ;; + none) + action="Skipping display server (DESKTOP_ENV=none)" && display "task" "$action" + ;; + *) + error_fatal "Unknown DESKTOP_ENV: $desktop_env. Valid options: dwm, hyprland, none" "1" + ;; + esac +} + +### Window Manager (conditional) +window_manager() { + display "title" "Window Manager" + case "$desktop_env" in + dwm) + dwm + ;; + hyprland) + hyprland + ;; + none) + action="Skipping window manager (DESKTOP_ENV=none)" && display "task" "$action" + ;; + *) + error_fatal "Unknown DESKTOP_ENV: $desktop_env. Valid options: dwm, hyprland, none" "1" + ;; + esac +} + ### Desktop Environment desktop_environment() { display "title" "Desktop Environment" |
