Module downloaded_apps
Expand description
The programs the person downloaded and added to their apps: the
AppImages, tarball programs and loose binaries that ship no desktop
entry, and the entry Tilo keeps for each of them.
The session keeps one registry of them (RESOURCE): the apps it has,
each as app of its entry, and the programs running now that have no
entry yet — the offers — which the person is asked once about. Its
reading is a DownloadedApps: the apps and the offers, each with the
file that starts it, whether that file is still there, and the artwork
its entry names (DownloadedApp, DownloadedOffer).
What changes them, over the same names: ADD and DECLINE answer an
offer (the person’s answer to “add this to your apps?”), LOCATE
points an entry at the file the person found after it went missing,
REMOVE takes an entry off the apps and leaves its file, and
UNINSTALL moves every copy of the program to the trash and then takes
the entry off.
What an action could not do lands in the reading too
(DownloadedFailure), so the person is told rather than left with
nothing happening.
Structs§
- Downloaded
App - One of the person’s apps that came from a download, as
RESOURCElists it: the entry Tilo keeps for it and the file that starts it. - Downloaded
Apps - The registry’s reading: the apps the person has, the programs running now that have no entry yet, and how the registry’s last actions went.
- Downloaded
Failure - Something the registry could not do, so a person can be told rather than left with an action that quietly did nothing.
- Downloaded
Offer - A program running now that has no entry: what adding it would add.
Enums§
- Downloaded
Doing - What the registry was asked to do to an app or an offer, and could not.
- Downloaded
Kind - What kind of download an app is: one self-contained file with its name and icon inside, or a binary alone or in the folder a tarball unpacked to.
Constants§
- ADD
- Add the program at
fileto the person’s apps, as the offer for it names it;move_to_applicationsputs a self-containedAppImagein the person’s Applications folder first. - APP_
PREFIX - What an app’s resource id starts with, before its desktop id.
- DECLINE
- Do not add the program at
file, and do not ask about that file again. - FILE_
PARAM - The parameters of
ADD: the program’s file, and whether to move it into the person’s Applications folder first. - LOCATE
- Point the entry at
path, the file the person found where it is now. - MOVE_
PARAM - PATH_
PARAM - The parameter of
LOCATE: where the program’s file is now. - PROVIDER
- The provider the session answers the downloaded programs under.
- REMOVE
- Take the entry off the person’s apps. The program’s file stays.
- RESOURCE
- The resource the registry is published as, and the session’s reading of
every app and offer (
DownloadedApps). - UNINSTALL
- Move every copy of the program to the trash, then take the entry off.