strip unused WallpaperService stuff
This commit is contained in:
parent
6b9ecc5b3d
commit
2aa72accda
1 changed files with 0 additions and 25 deletions
|
|
@ -1,37 +1,13 @@
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
import qs.config
|
import qs.config
|
||||||
import qs.utils
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string directory: "~/Wallpapers/"
|
|
||||||
property alias files: properties.files
|
|
||||||
property alias currentWallpaper: properties.currentWallpaper
|
property alias currentWallpaper: properties.currentWallpaper
|
||||||
property list<string> fileTypes: ["jpg", "jpeg", "png"]
|
|
||||||
property string command: `find ${root.directory} -maxdepth 1 -type f`
|
|
||||||
|
|
||||||
Process {
|
|
||||||
running: true
|
|
||||||
command: ["bash", "-c", `find ${root.directory} -maxdepth 1 -type f`]
|
|
||||||
stdout: StdioCollector {
|
|
||||||
onStreamFinished: {
|
|
||||||
root.files = this.text.split("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectoryWatcher {
|
|
||||||
path: root.directory
|
|
||||||
fileFilter: ["jpg", "jpeg", "png"]
|
|
||||||
onCreated: path => root.files.push(path)
|
|
||||||
onDeleted: path => root.files.filter(file => file != path)
|
|
||||||
onMovedFrom: path => root.files.filter(file => file != path)
|
|
||||||
onMovedTo: path => path => root.files.push(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
path: `${Paths.cache}/wallpaper.json`
|
path: `${Paths.cache}/wallpaper.json`
|
||||||
|
|
@ -46,7 +22,6 @@ Singleton {
|
||||||
id: properties
|
id: properties
|
||||||
|
|
||||||
property url currentWallpaper: ""
|
property url currentWallpaper: ""
|
||||||
property list<string> files: []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue