From d9be77d6429d598f3ec7eead1620c33556b7c865 Mon Sep 17 00:00:00 2001 From: BanceDev Date: Sat, 21 Feb 2026 14:54:14 -0500 Subject: initial commit --- polybar/scripts/check-all-updates.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 polybar/scripts/check-all-updates.sh (limited to 'polybar/scripts/check-all-updates.sh') diff --git a/polybar/scripts/check-all-updates.sh b/polybar/scripts/check-all-updates.sh new file mode 100755 index 0000000..dda6212 --- /dev/null +++ b/polybar/scripts/check-all-updates.sh @@ -0,0 +1,21 @@ +#!/bin/bash +#source https://github.com/x70b1/polybar-scripts + +# Count official repo updates +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 +fi + +# Count AUR updates using yay +if ! updates_aur=$(yay -Qu --quiet 2> /dev/null | wc -l ); then + updates_aur=0 +fi + +# Total updates +updates=$(("$updates_arch" + "$updates_aur")) + +if [ "$updates" -gt 0 ]; then + echo " $updates" +else + echo "0" +fi -- cgit v1.2.3-59-g8ed1b