all repos

dotfiles @ f8ffdbda2e0dbb8e3cd065e9dfca7a904eaa62d3

my dotfiles

config/polybar/scripts/updates-pacman.sh (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
    updates_arch=0
fi

if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
    updates_aur=0
fi

updates=$(("$updates_arch" + "$updates_aur"))

if [ "$updates" -gt 0 ]; then
    echo "# $updates"
else
    echo ""
fi