Checks for pacman
updates every hour, and echoes the update count to /var/local/countupdates/count
.
Polybar can then read this file and display the results.
pacman-contrib
- /usr/local/lib/systemd/system/checkupdates.service
- /usr/local/lib/systemd/system/checkupdates.timer
- ~/.config/polybar/scripts/count-updates.sh
- ~/.config/polybar/config
- /etc/pacman.d/hooks/countupdates.hook
You can easily fix the issue for the
ERROR: Cannot fetch updates
by simply ignoring it using the same one @wbollock suggested but better.checkupdates 2>/dev/null | wc -l
It's way superior and more convenient then running a whole service and timer for it.