lux-shell/services/WallpaperService.qml
2025-09-23 23:01:33 -04:00

27 lines
518 B
QML

pragma Singleton
import qs.config
import Quickshell
import Quickshell.Io
Singleton {
id: root
property alias currentWallpaper: properties.currentWallpaper
FileView {
path: `${Paths.cache}/wallpaper.json`
watchChanges: true
onFileChanged: reload()
// when changes are made to properties in the adapter, save them
onAdapterUpdated: writeAdapter()
JsonAdapter {
id: properties
property url currentWallpaper: ""
}
}
}