diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-05 16:26:38 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-05 16:26:38 +1000 |
| commit | 9a813f827feee7eb4a6036f7be64e3208bdf89bc (patch) | |
| tree | fdc1a56541022184e1f7961d00e5e1847db0326f /services/Wallpapers.qml | |
| parent | cachingimage: fix slow loading (diff) | |
| download | caelestia-shell-9a813f827feee7eb4a6036f7be64e3208bdf89bc.tar.gz caelestia-shell-9a813f827feee7eb4a6036f7be64e3208bdf89bc.tar.bz2 caelestia-shell-9a813f827feee7eb4a6036f7be64e3208bdf89bc.zip | |
feat: wallpaper
Diffstat (limited to 'services/Wallpapers.qml')
| -rw-r--r-- | services/Wallpapers.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml index 7e9a576..8e98e32 100644 --- a/services/Wallpapers.qml +++ b/services/Wallpapers.qml @@ -9,9 +9,14 @@ import Qt.labs.platform Singleton { id: root + readonly property string currentPath: `${StandardPaths.standardLocations(StandardPaths.GenericStateLocation)[0]}/caelestia/wallpaper/last.txt`.slice(7) readonly property string path: `${StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]}/Wallpapers`.slice(7) property list<Wallpaper> list + property bool showPreview: false + readonly property string current: showPreview ? preview : actualCurrent + property string preview + property string actualCurrent readonly property list<var> preppedWalls: list.map(w => ({ name: Fuzzy.prepare(w.name), @@ -32,6 +37,15 @@ Singleton { setWall.startDetached(); } + reloadableId: "wallpapers" + + FileView { + path: root.currentPath + watchChanges: true + onFileChanged: reload() + onLoaded: root.actualCurrent = text().trim() + } + Process { id: setWall |