Homebrew Update Notifier Update

Three years ago, I got annoyed enough to hack together a quick cron+shellscript update notifier, but it was never perfect, because the Zenity window liked to steal focus or pop up on top of other things.

Now, I’ve decided to remedy that problem, by porting it to Python and using a desktop notification as a non-intrusive prompt.


Ironically, that’s a bug that really is a feature. (cronjobs can’t see my KDE notification daemon, so they cause the Xfce one to spin up, and I don’t mind that for this purpose because the KDE one forces all tasks to collapse into a “missed notifications” tray icon after a non-configurable timeout while I’d prefer this to stay eye-catching.)

Here’s the code, in case anyone wants it.

If I ever get to replacing the call to apt-get with python-apt, maybe I’ll swap out the GObject event loop for a PyQt5 one, whip up a simple little “confirm these packages” popup of my own, and then expose the download/install progress indication via a KJobView popup.

If you’ve never seen those, here’s a screenshot produced by some example code I wrote to answer this StackExchange question:


I just wish they’d written the code to actually obey the “can’t pause” and “can’t cancel” hints.

CC BY-SA 4.0 Homebrew Update Notifier Update by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.