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
I agree cron would be a lot simpler than systemd timers. That choice was more of a learning exercise for systemd. As for why I'm storing the update count in a file rather than running checkupdates directly from Polybar:
ERROR: Cannot fetch updates
in my bar