feat(releng): add fws-updates-check script for update notifications

Add a new shell script that checks for available package updates using checkupdates from pacman-contrib. The script outputs the number of available updates with an icon for use in waybar/polybar status bars. Silent output when no updates are available allows the bar module to hide.
This commit is contained in:
nocode committed 2026-07-04 12:57:01 +02:00
1 parent c0e40e8aaf
commit 5934abe71c
1 file changed
+8
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
# FWS — indicateur « mises à jour disponibles » pour waybar/polybar.
# checkupdates (pacman-contrib) : lit les dépôts SANS toucher la base pacman.
# Sortie vide = rien à faire → le module de la barre se cache.
command -v checkupdates >/dev/null 2>&1 || exit 0
n="$(checkupdates 2>/dev/null | wc -l)"
[ "$n" -gt 0 ] && printf '󰚰 %s\n' "$n"
exit 0