Skip to content

Avoid reserved omarchy.* namespace collision when cloning under omarchy username - #12798

Closed
sanjyay wants to merge 1 commit into
omacom:quattrofrom
sanjyay:fix/issue-12678-plugin-clone-namespace-collision
Closed

sanjyay wants to merge 1 commit into
omacom:quattrofrom
sanjyay:fix/issue-12678-plugin-clone-namespace-collision

Conversation

@sanjyay

@sanjyay sanjyay commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Problem

When running omarchy plugin clone <plugin> as user omarchy (the default username suggested by the Omarchy installer and used across clean/test systems), omarchy-plugin-clone computes new_id="${USER}.${source_id#omarchy.}", resulting in omarchy.<id>.

Because PluginRegistry.qml unconditionally rejects third-party plugins in the omarchy.* namespace (String(tk).indexOf("omarchy.") === 0), the cloned plugin is silently ignored during plugin scan. Furthermore, omarchy-plugin-clone's discovery loop checks any(.[]; .id == $new_id), which matches the built-in first-party plugin on disk, misleadingly reporting success even though the clone never loaded.

Root cause and fix

  1. Fall back user_prefix to local if the username is omarchy or starts with omarchy., keeping the clone id (local.<id>) in the valid third-party namespace accepted by PluginRegistry.qml.
  2. Ensure the discovery loop specifically verifies the cloned third-party plugin (and (.firstParty | not)) rather than inadvertently matching the built-in plugin.

Fixes #12678.

Verification

Tested in a disposable OMAVM guest (Omarchy 4.0.3-1, Hyprland 0.56.2, Quickshell 0.3.1) from the clean fresh snapshot:

  • Added unit test in test/shell.d/plugin-clone-test.sh asserting that cloning under USER=omarchy assigns the local. prefix and enables the clone. Tested inside OMAVM: all 21 assertions passed.
  • Ran ./test/cli inside OMAVM: passed cleanly.
  • Executed live omarchy plugin clone omarchy.clock with USER=omarchy inside OMAVM: verified local.clock was generated, discovered as a third-party plugin in omarchy plugin list, enabled, and rendered on the bar.
  • Captured screenshot in OMAVM (omavm shot) showing local.clock active on the desktop.
  • Host machine was kept completely isolated; all execution and testing took place inside OMAVM.

@sanjyay

sanjyay commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #7366, which already addresses the same reserved namespace collision when cloning plugins as the omarchy user.

@sanjyay sanjyay closed this Sep 21, 2026
@sanjyay
sanjyay deleted the fix/issue-12678-plugin-clone-namespace-collision branch September 21, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin clone silently rejected when username collapses id back into omarchy. namespace

1 participant