change to using loaders
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
pragma Singleton
|
||||
import Quickshell.Io
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
|
||||
function getInitialTitle(callback) {
|
||||
initialTitleProc.running = true
|
||||
initialTitleProc.stdout.streamFinished.connect( function() {
|
||||
let cleaned = initialTitleProc.stdout.text.trim().replace(/\"/g, "")
|
||||
callback(cleaned === "null" ? "" : cleaned)
|
||||
})
|
||||
}
|
||||
|
||||
Process {
|
||||
id: initialTitleProc
|
||||
command: ["./scripts/initialTitle.sh"]
|
||||
running: false
|
||||
stdout: StdioCollector {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Config
|
||||
import qs.Modules
|
||||
import Caelestia.Models
|
||||
|
||||
Searcher {
|
||||
id: root
|
||||
|
||||
list: wallpapers.entries
|
||||
key: "relativePath"
|
||||
useFuzzy: true
|
||||
extraOpts: useFuzzy ? ({}) : ({
|
||||
forward: false
|
||||
})
|
||||
|
||||
// FileView {
|
||||
// path: root.currentNamePath
|
||||
// watchChanges: true
|
||||
// onFileChanged: reload()
|
||||
// onLoaded: {
|
||||
// root.actualCurrent = text().trim();
|
||||
// }
|
||||
// }
|
||||
|
||||
FileSystemModel {
|
||||
id: wallpapers
|
||||
|
||||
recursive: true
|
||||
path: Config.wallpaperPath
|
||||
filter: FileSystemModel.Images
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user