diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-13 23:31:47 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-13 23:31:47 +1000 |
| commit | 5da1b64da09e4c12bf850750cd1cf18b5bab3210 (patch) | |
| tree | 4e79285022869d5e30b37e616e10919a187a6c29 /utils/Paths.qml | |
| parent | dashboard: not full rounding for face (diff) | |
| download | caelestia-shell-5da1b64da09e4c12bf850750cd1cf18b5bab3210.tar.gz caelestia-shell-5da1b64da09e4c12bf850750cd1cf18b5bab3210.tar.bz2 caelestia-shell-5da1b64da09e4c12bf850750cd1cf18b5bab3210.zip | |
internal: better caching impl
WARNING: causes blocking when caching image on first load
Diffstat (limited to 'utils/Paths.qml')
| -rw-r--r-- | utils/Paths.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/Paths.qml b/utils/Paths.qml index 011bb1f..88267ea 100644 --- a/utils/Paths.qml +++ b/utils/Paths.qml @@ -1,6 +1,7 @@ pragma Singleton import Quickshell +import Quickshell.Io import Qt.labs.platform Singleton { @@ -12,4 +13,19 @@ Singleton { readonly property url data: `${StandardPaths.standardLocations(StandardPaths.GenericDataLocation)[0]}/caelestia` readonly property url state: `${StandardPaths.standardLocations(StandardPaths.GenericStateLocation)[0]}/caelestia` readonly property url cache: `${StandardPaths.standardLocations(StandardPaths.GenericCacheLocation)[0]}/caelestia` + + readonly property url imagecache: `${cache}/imagecache` + + function mkdir(path: url): void { + mkdirProc.path = path.toString().replace("file://", ""); + mkdirProc.startDetached(); + } + + Process { + id: mkdirProc + + property string path + + command: ["mkdir", "-p", path] + } } |