dotfiles/.i3blocks/updates
2018-03-27 17:38:03 +02:00

17 lines
332 B
Bash
Executable file

#!/usr/bin/env bash
if [ -f /dev/shm/claws_offline ]
then
echo "<span foreground=\"#F2777A\">█</span>"
exit
fi
avail=$(checkupdates | wc -l)
aur=$(yaourt -Qua | grep 'aur/' | wc -l)
if [[ $(($avail + $aur)) -eq 0 ]]
then
echo "<span foreground=\"#99CC99\">█</span>"
else
echo "<span foreground=\"#FFCC66\">█</span>"
fi