diff options
| -rw-r--r-- | services/Clip.qml | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/services/Clip.qml b/services/Clip.qml index b83c6d8..d03976c 100644 --- a/services/Clip.qml +++ b/services/Clip.qml @@ -15,9 +15,6 @@ Searchable { property list<string> _clipImg: [] property list<string> _clipImgIds: _clipImg.map(p => p.split("/").pop().split(".").shift()) - property var toDecode: "" - property string toCopy: "" - list: { if (!_clipHist?.length) return []; @@ -59,13 +56,11 @@ Searchable { } function decodeAndCopy(text) { - toDecode = text; - decodeAndCopyProc.running = true; + Quickshell.execDetached(["sh", "-c", `cliphist decode ${text} | wl-copy`]); } function copy(text) { - toCopy = text; - copyProc.running = true; + Quickshell.execDetached(["wl-copy", text]); } function _update() { @@ -74,15 +69,6 @@ Searchable { } Process { - id: decodeAndCopyProc - running: false - command: ["sh", "-c", "cliphist decode " + toDecode + " | wl-copy"] - onExited: { - toDecode = ""; - } - } - - Process { id: clipProc running: true command: ["cliphist", "-preview-width", 9 ** 9, "-max-items", 9 ** 9, "list"] @@ -119,15 +105,6 @@ Searchable { } Process { - id: copyProc - running: false - command: ["wl-copy", toCopy] - onExited: { - toCopy = ""; - } - } - - Process { id: watchProc running: true command: ["wl-paste", "-w", "echo"] |
