#!/bin/sh \xbps-install -SMun 1>/tmp/xbps_updates 2>/tmp/xbps_errors ne="$(grep -c broken /tmp/xbps_errors)" n="$(grep -c -e update -e install /tmp/xbps_updates)" if [ "$n" != "0" ] && [ "$ne" != "0" ]; then notify-send -c updates -u critical " Repository Sync" "Error downloading updates: $(cut -d " " -f 1,5 /tmp/xbps_errors)" elif [ "$n" -gt 1 ] && [ "$ne" = "0" ]; then notify-send -t 4000 -c updates " Repository Sync" "Updates available: $n" fi pkill -RTMIN+1 dwmblocks