rua
rua copied to clipboard
notify user (X11) on missing upgrades
Idea: create a framework to notify user on possible upgrades. E.g. a graphical notification on login.
Implementation proposal:
- when a user upgrades AUR via
rua upgrade
, propose to install the notification. Possible choices would be "Yes, No, Never". - for a "Yes" answer, an XDG entry will be created in autostart (~/.config/autostart by default). This will be launch-able on login, and trigger X11 notification for missing upgrades (if any).
- for a "No" answer from user, nothing is done
- for a "Never" answer form the user, an XDG entry is created with
Hidden=true
. This stops any kind of execution from XDG, but an XDG autostart manager will be able to see this entry, and the user can still change it in future. - the "Yes/No/Never" dialog will not be shown for the user if XDG
rua.desktop
file already exists. Be itHidden=true
,Hidden=false
or whatever else.
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?
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 asrua 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.
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.