diff options
Diffstat (limited to 'archsetup')
| -rwxr-xr-x | archsetup | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1449,6 +1449,25 @@ hyprland() { action="enabling hy3 plugin" && display "task" "$action" (sudo -u "$username" hyprpm enable hy3 >> "$logfile" 2>&1) || \ error "warn" "$action" "$?" + + # Pacman hook to rebuild plugins after Hyprland updates + # Prevents plugin version mismatch that causes plugins to fail loading + action="creating hyprpm pacman hook" && display "task" "$action" + mkdir -p /etc/pacman.d/hooks + cat > /etc/pacman.d/hooks/hyprpm.hook << 'HOOKEOF' +[Trigger] +Operation = Upgrade +Type = Package +Target = hyprland + +[Action] +Description = Rebuilding Hyprland plugins after update... +When = PostTransaction +Exec = /usr/bin/runuser -u ARCHSETUP_USERNAME -- /usr/bin/hyprpm update --no-shallow +HOOKEOF + # Replace placeholder with actual username + sed -i "s/ARCHSETUP_USERNAME/$username/" /etc/pacman.d/hooks/hyprpm.hook + chmod 644 /etc/pacman.d/hooks/hyprpm.hook } ### Display Server (conditional) |
