summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-08 22:42:23 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-08 22:42:23 +1000
commit66c012300a28a97f959808ed2e0f968c1e3601c0 (patch)
tree2c730b19d3898b9587022b3cf6c797eeb7ffde2b /utils
parentinternal: fix more colours (diff)
downloadcaelestia-shell-66c012300a28a97f959808ed2e0f968c1e3601c0.tar.gz
caelestia-shell-66c012300a28a97f959808ed2e0f968c1e3601c0.tar.bz2
caelestia-shell-66c012300a28a97f959808ed2e0f968c1e3601c0.zip
paths: better to string
Diffstat (limited to 'utils')
-rw-r--r--utils/Paths.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/Paths.qml b/utils/Paths.qml
index 0e3ac3b..87d5a48 100644
--- a/utils/Paths.qml
+++ b/utils/Paths.qml
@@ -17,7 +17,12 @@ Singleton {
readonly property url imagecache: `${cache}/imagecache`
function stringify(path: url): string {
- return path.toString().replace(/%20/g, " ");
+ let str = path.toString();
+ if (str.startsWith("root:/"))
+ str = `file://${Quickshell.shellDir}/${str.slice(6)}`;
+ else if (str.startsWith("/"))
+ str = `file://${str}`;
+ return new URL(str).pathname;
}
function expandTilde(path: string): string {