summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/Clip.qml22
1 files changed, 6 insertions, 16 deletions
diff --git a/services/Clip.qml b/services/Clip.qml
index 31ac2d4..af9ee7b 100644
--- a/services/Clip.qml
+++ b/services/Clip.qml
@@ -99,30 +99,20 @@ Singleton {
id: clipProc
running: true
command: ["cliphist", "-preview-width", 9 ** 9, "-max-items", 9 ** 9, "list"]
- property bool finished: false
- stdout: SplitParser {
- onRead: line => {
- if (clipProc.finished) {
- _clipHist = [];
- clipProc.finished = false;
- }
- if (line)
- _clipHist.push(line);
+ stdout: StdioCollector {
+ onStreamFinished: () => {
+ _clipHist = this.text.split(/\r?\n/);
}
}
- onExited: {
- finished = true;
- }
}
Process {
id: imgProc
running: true
command: ["sh", Quickshell.shellDir + "/utils/cliphist-img.sh"]
- stdout: SplitParser {
- onRead: line => {
- if (line)
- _clipImg.push(line);
+ stdout: StdioCollector {
+ onStreamFinished: () => {
+ _clipImg = this.text.split(/\r?\n/);
}
}
}