summaryrefslogtreecommitdiff
path: root/i3/.config/i3blocks/bin/updates
blob: bc57eac4314af275f14ed408a100497db9757668 (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=$(checkupdates | 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