Skip to content

Contracts

Singularity exposes a small set of stable contracts that apps, plugins, and widgets build against. They live in libsingularity so every component shares the same definitions.

InterfacePurpose
dev.sinty.ShellThe shell service: window, workspace, and desktop actions exposed to apps.
dev.sinty.AppSettingsApp-settings descriptors the shell reads to render per-app settings.
dev.sinty.App.SettingsThe per-app settings service apps implement to expose their own keys.

These are in-process interfaces resolved through libpeas. Implement them to extend the desktop:

InterfaceExtends
PluginThe base plugin entry point loaded from a .plugin manifest.
DockItemExtensionAdd or augment dock items.
DockContextMenuProviderContribute entries to dock context menus.
OverviewWidgetProviderProvide widgets shown in the overview.
SearchProviderAdd results to the overview search.
ShellSurfaceProviderProvide custom shell surfaces.

Beyond these interfaces, the PluginContext handed to a plugin at activation is itself part of the contract: through it a plugin adds panel and sidebar widgets, registers search and VPN providers, and reaches shell state, without touching the shell’s internals. See Plugins.

Shared look-and-feel preferences live in the dev.sinty.desktop GSettings schema (accent, dark mode, wallpaper, enabled plugins, and more). Always read it defensively, since standalone apps may run without it installed.

Wallpaper plugins implement WallpaperProvider. The interface exposes an id, a display_name, and these asynchronous operations:

OperationPurpose
choices(category_index, ...)List choices for a provider category.
browse(choice_id, query, page, ...)Return a page of wallpaper items.
import_item(item, ...)Import a selected item and return its local path.

Plugins register providers with PluginContext.add_wallpaper_provider(). The built-in provider has the ID singularity. Shipped provider plugins are wallpapers-stock, wallpapers-bing, and wallpapers-ocs. The OCS and Bing providers are opt-in and disabled by default.

Wallpaper pack metadata is discovered below singularity/wallpaper-collections in each XDG system data directory, followed by the same path in the user data directory. See Wallpaper packs for the on-disk format.

Per-user appearance is published to the com.singularity.Desktop AccountsService vendor extension so the greeter can read it before login:

PropertyMeaning
AccentThe user’s accent colour, as a hex string.
BackgroundThe user’s wallpaper URI.