#!/bin/sh # Get package count count=$(wc -l < ~/.cache/updates) # Generate message if [ "$count" = 0 ]; then msg="No updates available" else msg="$count Available Update" (("$count" > 1 )) && msg+="s" fi # Notify notify-send \ -i package-x-generic \ -h string:x-canonical-private-synchronous:updates \ "$msg" "$(cut -f1 -d' ' ~/.cache/updates)"