A long time ago I wrote Snap Manager extension.
That was not really clean but it worked.
I got a suggestion to use API (was @popey ? @ogra , well I cannot remember).
So many years later…
(yes – a new one, just starting, not yet published).
I experienced odd results if no refresh/changes are available, but that’s ok now.
But I cannot figure out how to listen to installed snaps changes. I obviously could listen to Shell’s appsystem changes but not all snaps are apps. https://gjs-docs.gnome.org/snapd2~2/
Hi. You can use the snapd-notices-monitor object to obtain events from the system. It will send signals every time a notice or an error event happens. I can’t point you to the online documentation because there is a problem ATM in the wiki.
Hmm, there’s in fact an issue:
because of this._snapdNoticesMonitor?.start();, the function _getChanges() do not do anything. It is triggered, so no problem from this side, but the get_changes_async is not executed or at least it does not display changes anymore.
Ok, so there is atm no advanced snap infos nor features, but it works (dialogs for remove/install/infos…). Yes I will use dialogs rather than notifications, that’s not a big deal.
There is one thing I don’t know, that’s how to make the menu scrollable if too long. And some people have a LOT of snaps.