i3: README for open (issue 935)
Documents the verb, its refusals, the percent-encoding and that each call that is acted on is written to the log of acts done by hand; names the package xdg-utils and that i3 hears nothing of the uplink. Builds: design 08 sign-in-page §31
This commit is contained in:
+30
-1
@@ -5,7 +5,8 @@ The window manager as a module (novox/hq ADR 0208, research 026, to-be 42 phase
|
||||
- **Claims `node-display-session`** and serves its verbs `reload`, `workspaces` and `windows`.
|
||||
- **Requires `x11-display`**, which only `xorg` on the same machine provides.
|
||||
- **Packages:** `i3-wm`, and `dex`, which the configuration has always run for XDG autostart. `dex`
|
||||
was missing on the desktop, so its autostart entries never started there.
|
||||
was missing on the desktop, so its autostart entries never started there. `xdg-utils` (ADR 0303 §2),
|
||||
for `open`'s `xdg-mime` and `xdg-open`.
|
||||
- **Environment** (ADR 0203): `XDG_CURRENT_DESKTOP=i3` and `XDG_SESSION_DESKTOP=i3`. They reach
|
||||
shells, the session (through `xorg`'s block) and the user manager (`environment.d`). The portal
|
||||
keys off the first.
|
||||
@@ -49,6 +50,7 @@ own business.
|
||||
| `node-display-session.reload` | a | checks, then reloads, keeping windows. Refused with the errors when the check fails; `force` reloads anyway |
|
||||
| `node-display-session.workspaces` | r | number, name, output, visible, focused, urgent |
|
||||
| `node-display-session.windows` | r | container id, X id, class, instance, role, title, workspace, output, focused, urgent, floating, fullscreen, scratchpad, marks; narrowed to one workspace |
|
||||
| `node-display-session.open` | a | opens an http or https address in the session's default browser, for any caller over the bus |
|
||||
| `i3_focus` | d | a window by criteria, or a workspace |
|
||||
| `i3_move` | d | windows to a workspace or output; a workspace to an output |
|
||||
| `i3_layout_save` | d | a workspace's arrangement as a named layout of placeholders (class, instance, role), in `~/.local/state/mesh/i3/layouts/` |
|
||||
@@ -65,6 +67,33 @@ value a caller gives is quoted before it reaches an i3 command. With no i3 runni
|
||||
`{"error": "no-graphical-session", …}`. The bundle's binary is `i3-tools`, so nothing that looks for
|
||||
`i3` by name finds it.
|
||||
|
||||
## `open` (novox/hq design 08 sign-in-page §3, §29, §30, §31; issue 935)
|
||||
|
||||
Opens an address in the session's default browser, for any caller over the bus — the sign-in
|
||||
reaction (`networkmanager`'s watcher) never calls it, so this is for every other caller. It does not
|
||||
go through i3's IPC `exec`, which hands a shell a command line; instead it asks the account's own
|
||||
program chooser (`xdg-mime query default x-scheme-handler/<scheme>`) and starts the program through
|
||||
the account's service manager (`systemd-run --user --collect --quiet --wait -- xdg-open <address>`),
|
||||
the address as one argument, never a shell. The run is bound to 10 s: within it, success answers
|
||||
`opened` and a failure is refused naming the opener's status; still running at the bound, the page
|
||||
may still be opening, so the run is left to go on and the answer says `opening`. `program` and
|
||||
`command` (the desktop entry and the first word of its `Exec` line) are given only once the opener
|
||||
started.
|
||||
|
||||
**Refused**, naming the reason: a scheme other than `http` or `https` (named), no scheme (a file
|
||||
path), no host, an address over 2048 bytes once encoded, no graphical session running, no default
|
||||
program for the scheme, the opener ending with a failure (its status named).
|
||||
|
||||
**The encoding** (RFC 3986): letters, digits, `-` `.` `_` `~` and the separators `:` `/` `?` `#` `[`
|
||||
`]` `@` `&` `=` `+` `%` are kept as they are; every other character — a space, a quote, `;`, `$(`,
|
||||
a comma among them — is percent-encoded, as the bytes of its UTF-8 form. Nothing is refused for a
|
||||
character, and no shell ever reads the address.
|
||||
|
||||
**Every call that is acted on is written to the log of acts done by hand**
|
||||
(`seat:mesh-hand-acts.hand-act`), with its caller and why; a call refused before the opener ran
|
||||
writes no act. It hears nothing of the uplink and reads no kept event at its own start: `i3` consumes
|
||||
no `node-uplink` event (ADR 0689 §3).
|
||||
|
||||
## What it improves over today's configuration
|
||||
|
||||
Both workstations ran the same configuration. These changes are against it:
|
||||
|
||||
Reference in New Issue
Block a user