#!/usr/bin/env bash . ~/bin/i3blocks/_utils # Check if updated Arch packages can be installed pkgupdate() { local pkgcount=$(checkupdates | wc -l) if [[ $pkgcount -ge 1 && $pkgcount -lt 20 ]]; then local bg=$mute_bg local fg=$mute_fg elif [[ $pkgcount -ge 20 ]]; then local bg=$warn1_bg local fg=$warn1_fg fi local stat="$pkgcount pkg updates" if [[ -n "$bg" ]]; then echo -e "$stat\n" fi } pkgupdate