Bind clipboard shortcut to plugin-owned IPC

This commit is contained in:
2026-09-06 00:36:46 +01:00
parent 4c3a665d2d
commit 2e0fb0cdd0
4 changed files with 53 additions and 24 deletions
+14 -1
View File
@@ -110,8 +110,21 @@ Item {
function onOpenPanelIdsChanged() { root.syncShellOpenState() }
}
// Direct IPC avoids the host panel Loader selecting a stale instance after
// plugin rescans. Keybindings should target this handler, not shell.toggle.
IpcHandler {
target: "alanfortlink.clipboard"
function open(): void { root.open() }
function close(): void { root.close() }
function show(): void { root.open() }
function hide(): void { root.close() }
function toggle(): void { root.toggle() }
function pause(payloadJson: string): string { return root.pause(payloadJson) }
function isPaused(): string { return root.isPaused() }
}
// ------------------------------------------------------------ pause
// Toggle via IPC: omarchy-shell shell call alanfortlink.clipboard pause '{"paused":true}'
// Toggle via IPC: omarchy-shell alanfortlink.clipboard pause '{"paused":true}'
// (or {"paused":false}, or {"paused":"toggle"}), and Ctrl+Space in the picker.
function setPaused(next) {
root.paused = !!next