← Otto Developer Guideotto-stash

User guide: Side Canvas: Stash
Specs: Stash

components/otto-stash/ collects things to ask an agent about (selected text, files, a screen region) into one “Ask about…” card, then hands them to Ask together. It is an app in architecture.toml and a proof of concept. It runs as one long-lived process that is both a Wayland client and a D-Bus service: the instance Otto autostarts owns org.otto.Stash1, and the same binary run with a subcommand (add, add-file PATH, add-region, send, cancel) calls that instance over the bus and exits. The shipped config binds those subcommands to shortcuts.

otto-stash: callers reach org.otto.Stash1; the Wayland loop gathers sources into the card and send opens the launcher

Modules

ModuleWhat it does
mainThe subcommands, the Wayland globals, the calloop event loop and the State that every other part reports to
dbusorg.otto.Stash1; asking org.otto.Files1 for the selection in the focused Files window; reading the send shortcut’s label from org.otto.Settings
requestWhat is stashed, in order, with which items are struck out; on hand-over it writes text selections to files
cardThe Card enum: the card in the side canvas, or the floating balloon
canvasThe card as an otto-canvas-v1 item (version 3 to 5)
panelThe balloon: a transparent layer-shell overlay with the card as a draggable subsurface
balloonDrawing the card’s contents at whatever width it is given
primaryThe primary selection through wlr-data-control, for apps whose text input reports no selection
regionA screen region picked with slurp and captured with grim
drop, inviteFiles dropped on the card, and the drop invitation that appears in the side canvas while a drag carrying files is under way

How it runs

Dependencies

Going deeper