summaryrefslogblamecommitdiff
path: root/i3blocks-packages.sh
blob: 3f7b2ad76780fa934beee5352442f5383dd0d875 (plain) (tree)
1
2
3
4
5
6
7


         
                                      

                                                                                                                        
           
#!/bin/sh
icon=󰏖

doas pkg update 2>/dev/null >/dev/null
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"