summaryrefslogtreecommitdiff
path: root/scripts/testing/lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testing/lib')
-rw-r--r--scripts/testing/lib/validation.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh
index 58f2174..16b4122 100644
--- a/scripts/testing/lib/validation.sh
+++ b/scripts/testing/lib/validation.sh
@@ -534,12 +534,68 @@ validate_portal_dark_mode() {
fi
}
+validate_hyprland_plugins() {
+ step "Checking Hyprland plugins installed"
+
+ # Check if hyprpm has repositories configured
+ local repos=$(ssh_cmd "sudo -u cjennings hyprpm list 2>/dev/null | grep -c 'Repository' || echo 0")
+ if [ "$repos" -lt 2 ]; then
+ validation_fail "Hyprland plugin repositories not configured (found $repos, expected 2)"
+ attribute_issue "hyprpm repositories not configured" "archsetup"
+ return 1
+ fi
+
+ # Check for expected enabled plugins
+ local missing=""
+ for plugin in hyprscrolling xtra-dispatchers hy3; do
+ if ! ssh_cmd "sudo -u cjennings hyprpm list 2>/dev/null | grep -A1 'Plugin $plugin' | grep -q 'enabled: true'"; then
+ missing="$missing $plugin"
+ fi
+ done
+
+ if [ -z "$missing" ]; then
+ validation_pass "All Hyprland plugins enabled (hyprscrolling, xtra-dispatchers, hy3)"
+ else
+ validation_fail "Hyprland plugins not enabled:$missing"
+ attribute_issue "Hyprland plugins not enabled:$missing" "archsetup"
+ fi
+}
+
+validate_hyprpm_hook() {
+ step "Checking hyprpm pacman hook"
+
+ local hook_file="/etc/pacman.d/hooks/hyprpm.hook"
+ if ! ssh_cmd "test -f $hook_file"; then
+ validation_fail "hyprpm pacman hook not found at $hook_file"
+ attribute_issue "hyprpm pacman hook missing" "archsetup"
+ return 1
+ fi
+
+ # Verify hook targets hyprland package
+ if ! ssh_cmd "grep -q 'Target = hyprland' $hook_file"; then
+ validation_fail "hyprpm hook doesn't target hyprland package"
+ attribute_issue "hyprpm hook misconfigured" "archsetup"
+ return 1
+ fi
+
+ # Verify hook runs hyprpm update
+ if ! ssh_cmd "grep -q 'hyprpm update' $hook_file"; then
+ validation_fail "hyprpm hook doesn't run hyprpm update"
+ attribute_issue "hyprpm hook misconfigured" "archsetup"
+ return 1
+ fi
+
+ validation_pass "hyprpm pacman hook configured correctly"
+}
+
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_plugins
+ validate_hyprpm_hook
validate_hyprland_socket
validate_portal_dark_mode
elif ssh_cmd "test -f /usr/local/bin/dwm"; then