The D-Bus contract
This page is the integrator surface for driving or querying DropTerm from another program - a GNOME Shell extension, a KDE widget, a swaybar module - without reading Rust: the address, the two interfaces, the CLI's wire encoding, the stability promise. Every member below is pinned to the served surface by a wire test in the terminal's own suite: a member added to either interface without a row on this page fails just check.
The address
On the user's session bus, the running instance owns one object path:
-
Bus name:
io.github.l1br3_io.dropterm -
Object path:
/io/github/l1br3_io/dropterm -
Interfaces:
io.github.l1br3_io.dropterm.V1(state) andorg.freedesktop.DbusActivation(verbs), both served at that path, beside the standardorg.freedesktop.DBusinterfaces every object server adds (Introspectable,Peer,Properties) -
The bus name is owned, not queued for. The first launch owns it for its lifetime, a second launch forwards through it and exits, and a name owned by a stale instance that no longer answers refuses the launch rather than spawning a duplicate.
-
Development builds (
just dev, thedev-identityfeature - Development) answer atio.github.l1br3_io.dropterm.Devand/io/github/l1br3_io/dropterm/Devinstead: a dev build never collides with an installed one.
That is the Linux binding; on macOS the same contract is served over a local unix domain socket - The macOS binding.
io.github.l1br3_io.dropterm.V1 - the state interface
The interface is read-only glance state: five properties, no methods. Watch this surface for an icon, a widget, a status line.
| Member | Signature | Meaning |
|---|---|---|
Visible | b, read | true while the drop-down surface is shown or animating in; false once it is gone or animating out. Exactly one flip per show and per hide. |
TabCount | u, read | Number of open tabs. |
Edge | s, read | The edge the surface is anchored at, in the configuration file's own word: Top or Bottom (configuration). |
HAlign | s, read | Horizontal placement within the output, in the configuration file's own word: Left, Center, or Right. |
SlideAnimationEnabled | b, read | Whether show and hide animate with the slide: the configuration's slide_animation_enabled on a layer-shell desktop, and always false in window mode, where the slide is not supported (configuration). |
EdgeandHAlignare the GNOME Shell extension's input (experimental): on a layer-shell desktop the compositor places the drop-down by them; on GNOME the extension places the terminal window by them. They say what the configuration asks for, whatever desktop is running.SlideAnimationEnabledis the extension's third input (experimental): the extension animates a window's show and hide by it; on every other desktop the app is its only reader, through the configuration itself.- The walk on GNOME found the slide does not run there, so window mode serves
falsewhatever the configuration asks (known issues); on COSMIC and sway the configuration's value is served unchanged.
Changes arrive as the standard org.freedesktop.DBus.Properties.PropertiesChanged signal for the interface, emitted only when a value changes - a no-op edit on the app side emits nothing. Reading a property is the standard Properties.Get call; that is all dropterm --is-visible does (CLI reference).
org.freedesktop.DbusActivation - the verb interface
You call the interface to make DropTerm act - a second launch, or your program standing in for one. It has three methods, no properties, and no reply payload:
| Member | Signature | Meaning |
|---|---|---|
Activate | (a{sv} platform_data) → () | Summon with no verb; the instance applies its default (a toggle). |
Open | (as uris, a{sv} platform_data) → () | Carried and ignored: DropTerm defines no openable target. Served for contract completeness - call it, get a normal reply, nothing happens. |
ActivateAction | (s action_name, as args, a{sv} platform_data) → () | Run a verb: action_name is the CLI verb's own name, args its argument words (the table below). The receiving instance re-parses both through the same definitions the CLI uses. |
- The
a{sv} platform_datadictionary (activation token, startup id) is accepted on the wire and dropped: DropTerm's surface is a layer surface, not the main window token handling would unminimize. - Every member is fire-and-forget: the call always replies
Ok- even when the verb's queue is full (bounded at 64 pending verbs; overflow is dropped with a server-side warning) or the receiver side has died.Okmeans the running instance's server accepted the call, never that the verb was applied; to observe the effect, watchVisible/TabCount. - The authority model is the CLI's own: any process in the same session can drive every verb, including spawning a command through
new-tab --cmd- the authority adropterm --cmd ...launch has always had. The seam's trust boundary is the session bus (Architecture).
The CLI verbs over the wire
Each CLI verb is one ActivateAction call - the verb's own name plus its arguments as plain words, only the flags given. A bare dropterm sends ActivateAction("toggle", []). The plain Activate member is served for contract completeness (a desktop-activation style caller); DropTerm's own CLI never sends it.
| CLI | Wire call |
|---|---|
dropterm / dropterm toggle | ActivateAction("toggle", []) |
dropterm show | ActivateAction("show", []) |
dropterm hide | ActivateAction("hide", []) |
dropterm new-tab [--cwd DIR] [--cmd COMMAND] [--profile NAME] | ActivateAction("new-tab", ["--cwd", DIR, "--cmd", COMMAND, "--profile", NAME]) - only the flags given |
dropterm close-tab [--tab-index N] | ActivateAction("close-tab", ["--tab-index", N]) when the index is given, else no args |
dropterm select-tab N | ActivateAction("select-tab", [N]) |
dropterm rename-tab TITLE [--tab-index N] | ActivateAction("rename-tab", [TITLE, "--tab-index", N]) - TITLE first, always |
dropterm duplicate-tab [--tab-index N] | ActivateAction("duplicate-tab", ["--tab-index", N]) when given |
dropterm switch-profile-tab --profile NAME [--tab-index N] | ActivateAction("switch-profile-tab", ["--profile", NAME, "--tab-index", N]) |
dropterm --is-visible | not a member - a Properties.Get of Visible on the V1 interface |
Full verb semantics (indices 1-based, quiet vs. showing verbs, startup behavior) are the CLI reference's; the wire carries exactly those verbs, nothing separate.
Two busctl lines:
# toggle the overlay
busctl --user call io.github.l1br3_io.dropterm /io/github/l1br3_io/dropterm \
org.freedesktop.DbusActivation ActivateAction sasa{sv} "toggle" 0 0
# read the glance state
busctl --user get-property io.github.l1br3_io.dropterm /io/github/l1br3_io/dropterm \
io.github.l1br3_io.dropterm.V1 Visible
The stability promise
The V1 D-Bus contract is the API; D-Bus is its Linux binding. The members documented here - names, signatures, the semantics above - are the stable surface: a newer DropTerm keeps answering an older caller across an upgrade, the same rule the second launch itself obeys. Wire tests (just check) pin the served surface: a member cannot change shape quietly. Nothing beyond that is promised: no versioning scheme, no pre-announced members.
The contract grows only by addition:
EdgeandHAlignjoinedV1that way: no existing member changed its name, signature, or meaning, so a consumer written against the original two properties needs nothing.- The duty falls on the newer consumer: a program that reads
EdgeorHAligntakes their absence from an older DropTerm asTopandCenter, the configuration's defaults. The extension does. SlideAnimationEnabledjoined the same way, later: its absence from an older DropTerm reads astrue, the configuration's default.
The macOS binding
The contract is the same, and only the address differs: macOS has no session bus, so the running instance serves the two interfaces peer-to-peer over a local unix domain socket - no bus daemon, no additional external service, nothing privileged. Members, signatures, object path, and the CLI's wire encoding are byte-identical to the tables above; only the transport differs, so the stability promise covers both bindings equally.
- Socket path:
$TMPDIR/dropterm.sock(launchd's per-user scratch directory), falling back to/tmp/dropterm-<uid>.sockwhen$TMPDIRis unset. Created user-only (0600). - Dev builds answer at
$TMPDIR/dropterm-dev.sock(fallback/tmp/dropterm-dev-<uid>.sock) - the same release/dev split the bus name carries on Linux: the two identities coexist as two sockets instead of contending for one. - Single instance = bind success: the first launch binds and serves every connecting client its own peer-to-peer connection at the same object path. A second launch connects, calls the same members - the destination field still names the bus name, a peer-to-peer convention your proxy library will ask for - and exits by the same table: a delivered verb is exit 0.
- A stale socket - the owner crashed and left the file behind - refuses the connect, is unlinked, and is retaken by the relaunch before serving. An owner that accepts but never answers (wedged) refuses the second launch after the same 5 s silence deadline as on Linux: exit 1, never a duplicate instance.
platform_datarides empty from DropTerm's own second launch - the XDG activation tokens do not exist on macOS - and is accepted and dropped exactly as on Linux; the member's argument shape is unchanged for consumers.
The trust boundary is the socket file's 0600 mode in the user's own $TMPDIR - the same-session authority model the session bus carries on Linux (Architecture).
Writing a consumer
The CLI is the reference consumer: a second launch forwards its verb through org.freedesktop.DBus to the running instance; one encoder/decoder pair (cli.rs) serves every word-carrying tab verb. An out-of-tree consumer needs only a D-Bus client - this page is the whole contract.