Expand description
Writing from other applications (docs/client.md, “Writing from other
applications”; docs/android.md, “Sharing”). Files and text shared to
Sioul, one of your addresses chosen in Android’s share sheet, a mailto:
link: each request (sioul_core::handed) becomes a draft whose window
opens. On a phone each address that can send is a direct-share target
(publish); on a computer sioul-app mailto:… is handed to the Sioul
already open (hand_over). Nothing is sent until you press Send.
Structs§
- Target 🔒
- One direct-share target: an address that can send, as Android shows it.
Statics§
- COMING 🔒
- Drafts whose files are still being copied: how many, and those already known not to come (refused), said with the rest when they arrive.
- LISTENING 🔒
- The socket this Sioul listens on, if it does.
- TOKEN 🔒
- The token handed by the last Sioul started after this one, waiting for
the window’s thread (
activate_with_token). - WINDOW 🔒
- The window, once it runs: what comes while it is open goes to it at once.
Functions§
- activate_
with_ 🔒token - On the window’s thread, before a window opens or comes forward: the
token handed on, given to Qt, which hands it to the compositor at the
next activation (
requestActivate) and forgets it. - addresses 🔒
- The program’s arguments that are
mailto:addresses (the desktop file’s%u: a mail link clicked while Sioul is the mail program). - alone 🔒
- The window’s pictures and the demo (SIOUL_GRAB, SIOUL_DEMO) run beside each other on one made-up profile: each stays its own, neither handing over nor listening.
- arrival_
line 🔒 - What the writing window says once the files came: “The 2 files are attached.”, or those not attached and why.
- attaching 🔒
- “Attaching 2 files…” while draft
idwaits for them, else “”. - coming 🔒
- Whether draft
idstill waits for files being copied for it. - hand 🔒
addresseshanded to the window: taken at its start, or at once.- hand_
over 🔒 - Another Sioul of this profile is open:
addresseshanded to it (with none, its window brought forward), and true: this one has nothing more to do. False when none answers: this one opens, and listens (listen). - hand_
over_ 🔒at - listen 🔒
- The first Sioul of this profile listens for those started after it: their
mailto:addresses become drafts here, a plain start brings this window forward. A socket left by a Sioul that ended is replaced. - listen_
at 🔒 - made 🔒
- One request made a draft, its window opened.
- own_
token 🔒 - The token a desktop gives the program it starts, on Wayland, so that the
window it opens may come to the front (xdg-activation-v1: the launcher’s
XDG_ACTIVATION_TOKEN). A second Sioul hands it on with its addresses: without it, KWin keeps the first Sioul’s draft behind the window you clicked in (focus stealing prevention). - poke 🔒
- Something was handed (Android’s ShareActivity, a second
sioul-app): taken now when the window runs, else when it starts. Any thread. - publish 🔒
- Android: the direct-share targets brought in step with the accounts, when
they changed (added, renamed, removed, their order).
recountcounts the Sent folders again (at the start, when the window comes back); otherwise the last counts rank them. Only while the window is shown: Android limits how often an app in the background may change them. Nothing elsewhere. - socket 🔒
- Where the Sioul of this profile listens for another one started after it: in the session’s runtime folder (Flatpak’s own for its applications), its name made from the state folder’s, so that a test or a demo profile never reaches yours; else in the state folder itself. None where it would not fit a socket’s name.
- started 🔒
- The window has started: what waits is taken, what comes later goes to it.
On the window’s thread, from
start. - stop_
listening 🔒 - Sioul ends: its socket goes with it, so that the next start does not knock there.
- take 🔒
- The requests waiting (
drafts/incoming/): files arrived for drafts made before are attached, each new request made a draft whose window opens. On the window’s thread, so that it never crosses the writing window’s own saves: at the start, when the window comes back, at its minute, and when something is handed. - targets 🔒
- The direct-share targets: each account that sends, the most used first
(
sent: messages in its Sent folders here), then by priority, then in the file’s order. - token_
of 🔒 - A token as it may be handed on: short, printable, without spaces (a compositor’s tokens are; anything else is not one).