summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/Paths.qml16
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]
+ }
}