dotfiles/.local/bin/statusbar/sb-pacpackages

11 lines
356 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/bin/sh
# Displays number of upgradeable packages.
# For this to work, have a `pacman -Sy` command run in the background as a
# cronjob every so often as root. This script will then read those packages.
# When clicked, it will run an upgrade via pacman.
2020-07-17 15:05:59 +02:00
no="$( pacman -Qu | grep -Fcv "[ignored]" )"
2020-12-19 14:38:25 +01:00
[ "$no" -gt 0 ] && printf '📦%s' "$no"
printf '\n'