mirror of
https://github.com/edu4rdshl/Strata.git
synced 2026-07-18 07:34:45 +00:00
Two changes for 0.7.0: BREAKING (D-Bus): the service is renamed from org.gnome.Strata to dev.edu4rdshl.Strata. The org.gnome.* namespace is reserved for official GNOME software; Strata is third-party, so it now uses the reverse-DNS of its own domain (matching the strata@edu4rdshl.dev UUID). Bus name, object path (/dev/edu4rdshl/Strata), and interface (dev.edu4rdshl.Strata.Manager) all change. Daemon and extension are updated together; only external busctl scripts / non-GNOME front-ends that hard-coded the old name need updating. The GSettings schema (org.gnome.shell.extensions.strata) is unchanged - that namespace is correct for GNOME Shell extension settings. Fix recursion: the theme-context 'changed' handler reloaded light.css, but load_stylesheet itself emits 'changed', so it fed back into itself and hit "too much recursion" - flooding the journal and spinning the CPU on screen unlock (which restyles widgets and fires 'changed'). The subscription is removed; light.css is loaded once. Dark/light switching is unaffected (it is the panel's class toggle, not this load). A GNOME Shell theme switch no longer auto-re-applies the sheet, which is recoverable by re-enabling. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
79 lines
2.2 KiB
JavaScript
79 lines
2.2 KiB
JavaScript
/**
|
|
* dbus.js - Async D-Bus proxy for the Strata daemon.
|
|
*
|
|
* Uses Gio.DBusProxy.makeProxyWrapper to generate a typed proxy class.
|
|
* All method calls should use the *Async variants (return Promises) to avoid
|
|
* blocking the GNOME Shell compositor main loop.
|
|
*/
|
|
|
|
import Gio from 'gi://Gio';
|
|
|
|
const STRATA_IFACE_XML = `
|
|
<node>
|
|
<interface name="dev.edu4rdshl.Strata.Manager">
|
|
|
|
<method name="GetHistory">
|
|
<arg type="u" direction="in" name="offset"/>
|
|
<arg type="u" direction="in" name="limit"/>
|
|
<arg type="s" direction="out" name="json"/>
|
|
</method>
|
|
|
|
<method name="SearchHistory">
|
|
<arg type="s" direction="in" name="query"/>
|
|
<arg type="u" direction="in" name="limit"/>
|
|
<arg type="s" direction="out" name="json"/>
|
|
</method>
|
|
|
|
<method name="GetThumbnail">
|
|
<arg type="s" direction="in" name="id"/>
|
|
<arg type="ay" direction="out" name="png_bytes"/>
|
|
</method>
|
|
|
|
<method name="GetItemContent">
|
|
<arg type="s" direction="in" name="id"/>
|
|
<arg type="s" direction="out" name="mime_type"/>
|
|
<arg type="ay" direction="out" name="content"/>
|
|
</method>
|
|
|
|
<method name="SetClipboard">
|
|
<arg type="s" direction="in" name="id"/>
|
|
</method>
|
|
|
|
<method name="DeleteItem">
|
|
<arg type="s" direction="in" name="id"/>
|
|
</method>
|
|
|
|
<method name="ClearHistory"/>
|
|
|
|
<method name="Shutdown"/>
|
|
|
|
<method name="SetConfig">
|
|
<arg type="u" direction="in" name="max_history"/>
|
|
<arg type="u" direction="in" name="max_text_bytes"/>
|
|
<arg type="u" direction="in" name="max_image_bytes"/>
|
|
</method>
|
|
|
|
<method name="SubmitItem">
|
|
<arg type="s" direction="in" name="mime_type"/>
|
|
<arg type="ay" direction="in" name="content"/>
|
|
</method>
|
|
|
|
<signal name="ItemAdded">
|
|
<arg type="s" name="id"/>
|
|
<arg type="s" name="mime_type"/>
|
|
<arg type="s" name="preview"/>
|
|
</signal>
|
|
|
|
<signal name="ItemDeleted">
|
|
<arg type="s" name="id"/>
|
|
</signal>
|
|
|
|
<signal name="HistoryCleared"/>
|
|
|
|
</interface>
|
|
</node>`;
|
|
|
|
export const StrataProxy = Gio.DBusProxy.makeProxyWrapper(STRATA_IFACE_XML);
|
|
|
|
export const BUS_NAME = 'dev.edu4rdshl.Strata';
|
|
export const OBJECT_PATH = '/dev/edu4rdshl/Strata';
|