dotfiles/.config/polybar/scripts/updates-arch-combined.sh.desk

16 lines
303 B
Plaintext
Raw Normal View History

2018-05-03 20:23:53 +02:00
#!/bin/sh
updates_arch=$(/usr/bin/checkupdates | wc -l)
2018-05-03 20:23:53 +02:00
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo "%{F#dd7777}%{F#ddd} $updates"
else
echo "%{F#77dd77}%{F#ddd} 0"
fi