feat(desktop): home app (system-only launch cap, LAUNCH_BADGE: apps+launch only), pm starts it with session (relaunch <=5); display keys F1/Alt+Tab next, F2 home, F4 close app (ROLE from launcher, terminal exempt), close returns to previous window; closed window -> app exits; shell 'name &'; launch by id; pm stack 8, storage 16 clients
This commit is contained in:
17
docs/apps.md
17
docs/apps.md
@@ -91,12 +91,23 @@ optional one is simply not granted.
|
||||
| `display` | a window of its own, named from its manifest: its pixels, and the keyboard while it is in front |
|
||||
| `storage` | the user's `data/<id>/`, read-write (its own folder only) |
|
||||
| `permissions` | a management copy of the permission manager's endpoint (below) |
|
||||
| `session` | init's session copy: who is signed in (`WHO`), and signing out |
|
||||
| `session` | init's session copy: who is signed in (`WHO`), the theme, and signing out |
|
||||
| `launch` | a launcher copy of the permission manager's endpoint: `APPS` and `LAUNCH` only |
|
||||
|
||||
`permissions` and `session` are **system only**: only an app on the system
|
||||
`permissions`, `session` and `launch` are **system only**: only an app on the system
|
||||
image (with a factory decision) has them. Installing an app that asks for
|
||||
either, required or optional, is refused (`SYSTEM_ONLY`). Settings
|
||||
(`kos.settings`) is the app that holds them.
|
||||
(`kos.settings`) holds the first two, Home (`kos.home`) the third.
|
||||
|
||||
Home is the session's desktop: the permission manager starts it when the
|
||||
session starts (and again if it dies, five times at most), and it lists
|
||||
every app with a window and opens the one pressed, each in its own
|
||||
window, as many as there is room for (8 windows, 24 MiB between the
|
||||
apps). Its copy of the endpoint is badged `LAUNCH_BADGE`: it may list and
|
||||
launch, but pass nothing along, so what it opens gets no output and no
|
||||
folder. The shell still runs apps and waits; `name &` starts one without
|
||||
waiting (and without the current folder, which nobody would take back).
|
||||
An app is named to `LAUNCH` by its command or its id.
|
||||
|
||||
## Decisions
|
||||
|
||||
|
||||
11
docs/ipc.md
11
docs/ipc.md
@@ -173,7 +173,16 @@ The display server alone holds the screen (`types::display::window`,
|
||||
client `libkos::display`). It draws the OS bar along the top: every
|
||||
window's name, the one in front highlighted, and who is signed in (init
|
||||
says, `SET_USER`). Below it, the window in front fills the screen; one is
|
||||
in front at a time, a new one comes to the front, and F1 brings the next.
|
||||
in front at a time, a new one comes to the front, and F1 (or Alt+Tab) brings
|
||||
the next; closing the one in front brings back the one in front before
|
||||
it. At most 8 windows are open. The display keeps three keys to itself:
|
||||
F1/Alt+Tab, F2 (Home to the front) and F4 (close the app in front). What
|
||||
a window is comes from its launcher before the app runs (`ROLE`): the
|
||||
permission manager says `HOME` for Home and `APP` for every other app; a
|
||||
window given no role (the terminal's) is never closed by F4. Closing an
|
||||
app's window revokes it and signals the app, whose next call through it
|
||||
fails: `libkos::display::poll` says `Closed`, and K-UI apps and
|
||||
`poll_input` users exit, which the permission manager sees as a death.
|
||||
A window is opened (`OPEN`, with the name the bar shows) only through a
|
||||
launcher's copy of the display endpoint, one init gave a system program:
|
||||
the terminal opens its own, the permission manager one for each app
|
||||
|
||||
Reference in New Issue
Block a user