From 1a26090ba7df4b076f011b8f9ac5d4d81dc14a02 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Wed, 10 Jun 2020 17:08:37 -0400 Subject: updated porter, blocks, findport --- i3blocks-packages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'i3blocks-packages.sh') diff --git a/i3blocks-packages.sh b/i3blocks-packages.sh index 6e5d0e9..4fd211f 100755 --- a/i3blocks-packages.sh +++ b/i3blocks-packages.sh @@ -1,6 +1,6 @@ #!/bin/sh icon=󰏖 -package_count=$(pkg upgrade -n | tail -1 | cut -s -d':' -f2 | cut -w -f2) -[ -n "$package_count" ] && [ "$package_count" -gt 0 ] && printf "%s%s" $icon $package_count && notify-send "$package_count package upgrade(s) available" +count=$(pkg upgrade -n | sed -n 's/^Number of packages to be installed:\(.*\)/\1/p') +[ -n "$count" ] && [ "$count" -gt 0 ] && printf "%s%s" $icon $count && notify-send "$count package upgrade(s) available" printf "\n" -- cgit v1.2.3