Files
z-bar-qt/Helpers/WallpaperPath.qml
T
Zacharias-Brohn d56a0260fb formatter
2026-02-24 23:20:11 +01:00

30 lines
526 B
QML

pragma Singleton
import Quickshell
import Quickshell.Io
import qs.Paths
Singleton {
id: root
property alias currentWallpaperPath: adapter.currentWallpaperPath
property alias lockscreenBg: adapter.lockscreenBg
FileView {
id: fileView
path: `${Paths.state}/wallpaper_path.json`
watchChanges: true
onAdapterUpdated: writeAdapter()
onFileChanged: reload()
JsonAdapter {
id: adapter
property string currentWallpaperPath: ""
property string lockscreenBg: `${Paths.state}/lockscreen_bg.png`
}
}
}