rice/scripts/package-updates

29 lines
863 B
Plaintext
Raw Permalink Normal View History

2021-11-10 21:45:10 -08:00
#!/usr/bin/env bash
2021-07-28 23:44:53 -07:00
format() {
if [ "$1" -eq 0 ]; then
echo '-'
else
echo "$1"
fi
}
if ! updates_arch="$(checkupdates | wc -l)"; then
updates_arch=0
fi
if ! updates_aur="$(paru -Qum 2>/dev/null | wc -l)"; then
updates_aur=0
fi
updates="$((updates_arch + updates_aur))"
if [ "$updates" -gt 0 ]; then
#echo " ($(format $updates_arch)/$(format $updates_aur))"
2021-10-25 18:52:55 -07:00
# echo " ($(format $updates_arch)/$(format $updates_aur))"
2021-11-10 21:45:10 -08:00
# dunstify -i "/usr/share/icons/breeze-dark/mimetypes/24/package-x-generic.svg" " Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
# dunstify -i "/usr/share/icons/breeze-dark/mimetypes/24/package-x-generic.svg" "Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
2021-11-03 11:43:16 -07:00
echo " ($(format $updates_arch)/$(format $updates_aur))"
2021-07-28 23:44:53 -07:00
else
echo
fi