Files
z-bar-qt/Helpers/WallpaperPath.qml
Zacharias-Brohn ab54178747 lock screen?
2025-12-05 01:25:50 +01:00

27 lines
625 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: Quickshell.env("HOME") + "/.local/state/z-bar/wallpaper_path.json"
watchChanges: true
onFileChanged: reload()
onAdapterUpdated: writeAdapter()
JsonAdapter {
id: adapter
property string currentWallpaperPath: ""
property string lockscreenBg: `${Paths.state}/lockscreen_bg.png`
}
}
}