080a77c5e3
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.
9 lines
369 B
Bash
Executable File
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
|