Skip to main content

Module downloaded_apps

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§

DownloadedApp
One of the person’s apps that came from a download, as RESOURCE lists it: the entry Tilo keeps for it and the file that starts it.
DownloadedApps
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.
DownloadedFailure
Something the registry could not do, so a person can be told rather than left with an action that quietly did nothing.
DownloadedOffer
A program running now that has no entry: what adding it would add.

Enums§

DownloadedDoing
What the registry was asked to do to an app or an offer, and could not.
DownloadedKind
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 file to the person’s apps, as the offer for it names it; move_to_applications puts a self-contained AppImage in 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.

Functions§

app
The resource the app with desktop id desktop_id reads as: its facts, and the actions that change its entry.
target