diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-24 18:37:14 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-24 18:37:14 -0600 |
| commit | 6ce385c2be62492d43ef90b9525d38edc7cd8190 (patch) | |
| tree | 8f3c70f73b558e71de23c8a07f29494bb4554bcc /scripts/testing/lib/validation.sh | |
| parent | 9bc93ba94a6f14c2ff6f11f6f85d100dd2c3ffb2 (diff) | |
feat(archsetup): add Hyprland/Wayland desktop environment support
- Add DESKTOP_ENV config variable (dwm/hyprland/none, default: hyprland)
- Create wayland() and hyprland() installation functions
- Add display_server/window_manager conditional step wrappers
- Create dotfiles/hyprland/ with full config suite:
- hyprland.conf with keybindings translated from DWM + sxhkd
- waybar config matching conky status bar
- hypridle/hyprlock for screen locking
- wofi config matching rofi theme
- gammastep config for Wayland (replaces redshift)
- Add Hyprland validation tests to validation.sh
- Update archsetup.conf.example with DESKTOP_ENV option
Diffstat (limited to 'scripts/testing/lib/validation.sh')
| -rw-r--r-- | scripts/testing/lib/validation.sh | 73 |
1 files changed, 71 insertions, 2 deletions
diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh index 211af5a..c0a5d43 100644 --- a/scripts/testing/lib/validation.sh +++ b/scripts/testing/lib/validation.sh @@ -274,8 +274,8 @@ run_all_validations() { validate_yay_installed validate_pacman_working - # Window Manager - validate_suckless_tools + # Window Manager (detects DWM or Hyprland automatically) + validate_window_manager # Essential Services validate_firewall @@ -453,6 +453,75 @@ validate_suckless_tools() { fi } +validate_hyprland_tools() { + step "Checking Hyprland tools" + local missing="" + + # Check core Hyprland packages + for pkg in hyprland hypridle hyprlock waybar wofi swww grim slurp gammastep; do + if ! ssh_cmd "pacman -Q $pkg &>/dev/null"; then + missing="$missing $pkg" + fi + done + + # st should still be installed (via XWayland) + if ! ssh_cmd "test -f /usr/local/bin/st"; then + missing="$missing st" + fi + + if [ -z "$missing" ]; then + validation_pass "All Hyprland tools installed" + else + validation_fail "Missing Hyprland tools:$missing" + attribute_issue "Missing Hyprland tools:$missing" "archsetup" + fi +} + +validate_hyprland_config() { + step "Checking Hyprland configuration files" + local missing="" + + for config in ".config/hypr/hyprland.conf" ".config/hypr/hypridle.conf" \ + ".config/hypr/hyprlock.conf" ".config/waybar/config" \ + ".config/wofi/config" ".config/gammastep/config.ini"; do + if ! ssh_cmd "test -f /home/cjennings/$config"; then + missing="$missing $config" + fi + done + + if [ -z "$missing" ]; then + validation_pass "All Hyprland config files present" + else + validation_fail "Missing Hyprland configs:$missing" + attribute_issue "Missing Hyprland configs:$missing" "archsetup" + fi +} + +validate_hyprland_socket() { + step "Checking Hyprland IPC socket" + # Note: This only works if Hyprland is running. Skip if no display. + if ssh_cmd "test -S /tmp/hypr/*/.socket.sock 2>/dev/null"; then + validation_pass "Hyprland socket exists" + else + validation_warn "Hyprland socket not found (Hyprland may not be running)" + fi +} + +validate_window_manager() { + # Detect which desktop environment is installed and validate accordingly + if ssh_cmd "pacman -Q hyprland &>/dev/null"; then + section "Hyprland Desktop Environment" + validate_hyprland_tools + validate_hyprland_config + validate_hyprland_socket + elif ssh_cmd "test -f /usr/local/bin/dwm"; then + section "DWM Desktop Environment" + validate_suckless_tools + else + validation_warn "No window manager detected (DESKTOP_ENV=none?)" + fi +} + #----------------------------------------------------------------------------- # Essential Services Validations #----------------------------------------------------------------------------- |
