summaryrefslogtreecommitdiff
path: root/i3blocks-packages.sh
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-06-10 17:08:37 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-06-10 17:08:37 -0400
commit1a26090ba7df4b076f011b8f9ac5d4d81dc14a02 (patch)
tree7b54ccaa0813ba6ac3f9cfa1f99a313c386265f0 /i3blocks-packages.sh
parentade76bb57b81f879e4a2d59709db84f874524bcd (diff)
downloadscripts-1a26090ba7df4b076f011b8f9ac5d4d81dc14a02.tar.xz
scripts-1a26090ba7df4b076f011b8f9ac5d4d81dc14a02.zip
updated porter, blocks, findport
Diffstat (limited to 'i3blocks-packages.sh')
-rwxr-xr-xi3blocks-packages.sh4
1 files changed, 2 insertions, 2 deletions
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"