Files
I-DeskPet/Modules/GetGifs.qml
T
2026-02-14 17:20:10 +01:00

21 lines
417 B
QML

import Quickshell.Io
Process {
id: getGifsProcess
required property string gifFolder
property list<string> gifsList: []
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
stdout: StdioCollector {
onStreamFinished: {
var gifs = this.text.trim().split("\n")
if (gifs.length > 0 && gifs[0] !== "") {
getGifsProcess.gifsList = gifs
} else {
getGifsProcess.gifsList = []
}
}
}
}