Files
FWS-ISO/configs/releng/airootfs/usr/local/bin/fws-updates-check
T
nocode 080a77c5e3 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.
2026-07-04 12:57:01 +02:00

9 lines
369 B
Bash
Executable File

#!/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