Skip to content

Indicators: load indicators provided by other plugins - #11659

Open
xxbouncingsoulxx wants to merge 1 commit into
omacom:quattrofrom
xxbouncingsoulxx:plugin-provided-indicators
Open

xxbouncingsoulxx wants to merge 1 commit into
omacom:quattrofrom
xxbouncingsoulxx:plugin-provided-indicators

Conversation

@xxbouncingsoulxx

Copy link
Copy Markdown

What

omarchy.indicators can now host indicators shipped by other plugins. An items entry may be an object naming the plugin and the QML file inside it:

{ "id": "omarchy.indicators",
  "items": ["Dnd", "NightLight", { "id": "Backup", "plugin": "my.org.backup", "source": "Indicator.qml" }] }

The widget looks the plugin up in the shell's plugin registry (installedPlugins[id].__sourceDir) and loads <dir>/<source> (source defaults to Indicator.qml). The file is a normal BarIndicator; the entry's other keys are passed as settings, so the plugin's indicator can be configured the same way as its bar widget.

Why

The indicator group is the right home for "something is going on" state: hidden while idle, revealed dimmed on hover, visible when active. Today only the six first-party indicators can live there; a plugin that wants the same behaviour has to add a standalone bar icon or the user has to clone the whole widget. My use case is a restic backup job: red when the last run failed, green while it runs, hidden otherwise - see screenshots.

Behaviour

  • Entries without plugin resolve to ../indicators/<id>.qml exactly as before.
  • Unknown plugin id, .. in source, or an absolute source → nothing is loaded and a warning is logged.
  • Resolution re-evaluates on registryRevision, so a plugin installed after the bar started is picked up on rescan.

Testing

  • ./test/all (CLI + shell suites) on this branch.
  • Running on Omarchy 4.0.2 as a cloned widget for a day: stock indicators unchanged, plugin indicator switches active/inactive, hover reveal and click work.

Screenshots: hidden (ok) · failed (red) · running (green) · hover-revealed.
screenshot-indicator-failed
screenshot-indicator-ok-hidden
screenshot-indicator-revealed
screenshot-indicator-running

An items entry of omarchy.indicators may now name a plugin and a QML file
inside it: { "id": "Backup", "plugin": "my.org.backup", "source": "Indicator.qml" }.
The widget resolves the plugin through the shell registry (__sourceDir) and
loads <dir>/<source>; the file is a normal BarIndicator and gets the entry's
other keys as settings. Entries without "plugin" resolve to
../indicators/<id>.qml as before. Unknown plugins, ".." and absolute paths
load nothing.

This lets a plugin put its own state (a backup job, a sync client, ...) into
the hover-reveal indicator group instead of adding a standalone bar icon.
@csfh

csfh commented Sep 13, 2026

Copy link
Copy Markdown
Member

@dhh this could be a potentially reasonable PR if we want to expand a shell plug-in API.

@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants