vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
424 stars 42 forks source link

notify user (X11) on missing upgrades #117

Open vn971 opened 4 years ago

vn971 commented 4 years ago

Idea: create a framework to notify user on possible upgrades. E.g. a graphical notification on login.

Implementation proposal:

Request for comments: if there are considerations against such "Never" behavior or it feels privacy violating in any way, please share. I hope it's not, because nothing is ever executed in this scenario.

The XDG entry, if created and enabled, would call a subcommand rua notify-upgrades-x11 (might be hidden to not clutter the help), which would behave exactly as rua upgrade --printonly, only it will trigger an X11 notification instead of printing to console.

This is only an idea for now, feel free to propose other solutions / comment. Thoughts?

qoh commented 4 years ago

To me this sounds like the job for another program.

The XDG entry, if created and enabled, would call a subcommand rua notify-upgrades-x11 (might be hidden to not clutter the help), which would behave exactly as rua upgrade --printonly, only it will trigger an X11 notification instead of printing to console.

If anything, rua upgrade could have an option to offer the --printonly information in a more programmatically accessible format (tabs and newline separation?), which such an additional notification tool could consume.

vn971 commented 4 years ago

Yeah, it could be another program as well. But you can have such a program independently already, there are no restrictions for that. I just want any simple solution that would bring actual X11 notifications for the user -- whatever that'll be, presuming it's secure, maintainable and not privacy-invasive.

an option to offer the --printonly information in a more programmatically accessible format

But that is already the case, isn't it?:

$ rua upgrade --printonly 2>/dev/null
packageA
packageB

Packages separated by newline. Consumable by other scripts, should one build an X11 notification, or something completely different, on their own.