blob: 4385305e5e0f45f79d4300569fae3edaf555be73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/env bash
if command -v pacman -Qu > /dev/null; then
n_updates=$(pacman -Qu | wc -l)
if [[ n_updates -gt 150 ]]; then
color='red'
elif [[ n_updates -gt 50 ]]; then
color='yellow'
else
color='gray'
fi
echo "<span color='$color'></span> $n_updates"
fi
|