Refresh after pacman transactions and local repo builds

Add a pacman hook that runs update-notify for each logged-in user with the timer active, and a path unit that users can point at their local repo databases to refresh after aur build.
This commit is contained in:
Daniele Fucini
2026-10-16 09:34:19 +02:00
parent e0059e490c
commit 7b30b24715
4 changed files with 54 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
# Run update-notify for every logged-in user whose timer is active (called by the pacman hook as root)
systemctl list-units --plain --no-legend --state=running 'user@*.service' |
while read -r unit _; do
uid=${unit#user@}
uid=${uid%.service}
user=$(id -nu "$uid") || continue
systemctl --user -M "$user@" is-active --quiet update-notify.timer || continue
systemctl --user -M "$user@" start --no-block update-notify.service
done