Synchronize picker with host panel state

This commit is contained in:
2026-09-06 00:30:08 +01:00
parent 0f308bd59f
commit 4c3a665d2d
2 changed files with 19 additions and 1 deletions
+18
View File
@@ -14,6 +14,10 @@ import "Classify.js" as Classify
Item {
id: root
// Injected by the Omarchy plugin host. Following its shared panel-open state
// keeps the mapped window and the host's callable Loader in sync even after
// plugin rescans temporarily leave more than one Loader instance alive.
property var shell: null
property bool opened: false
property string filterText: ""
property string typeFilter: "" // chip filter, "" = all; combined into the query
@@ -92,6 +96,20 @@ Item {
else root.open()
}
function syncShellOpenState() {
if (!root.shell || !root.shell.openPanelIds) return
var shouldOpen = root.shell.openPanelIds["alanfortlink.clipboard"] === true
if (shouldOpen && !root.opened) root.open()
else if (!shouldOpen && root.opened) root.close()
}
onShellChanged: root.syncShellOpenState()
Connections {
target: root.shell
function onOpenPanelIdsChanged() { root.syncShellOpenState() }
}
// ------------------------------------------------------------ pause
// Toggle via IPC: omarchy-shell shell call alanfortlink.clipboard pause '{"paused":true}'
// (or {"paused":false}, or {"paused":"toggle"}), and Ctrl+Space in the picker.
+1 -1
View File
@@ -2,7 +2,7 @@
"schemaVersion": 1,
"id": "alanfortlink.clipboard",
"name": "Clipboard History",
"version": "1.0.3",
"version": "1.0.4",
"author": "alanfortlink",
"description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews",
"kinds": [