Bind clipboard shortcut to plugin-owned IPC
This commit is contained in:
+14
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user