Claude pog?
This commit is contained in:
+22
-2
@@ -2,12 +2,32 @@ import Quickshell.Io
|
||||
|
||||
Process {
|
||||
id: getGifsProcess
|
||||
required property string gifFolder
|
||||
property list<string> gifsList: []
|
||||
command: ["sh", "-c", "$HOME/.config/quickshell/QtDesktopPet/Scripts/files.sh"]
|
||||
|
||||
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
var gifs = this.text.trim().split("\n")
|
||||
getGifsProcess.gifsList = gifs
|
||||
if (gifs.length > 0 && gifs[0] !== "") {
|
||||
getGifsProcess.gifsList = gifs
|
||||
} else {
|
||||
getGifsProcess.gifsList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reload() {
|
||||
// Clear current list and restart the process
|
||||
gifsList = []
|
||||
running = false
|
||||
running = true
|
||||
}
|
||||
|
||||
onGifFolderChanged: {
|
||||
if (running) {
|
||||
reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user