From e4d2226dd0c84fa6e201f1c424cf5c3e0df24c0f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 19 Jun 2025 20:18:04 +1000 Subject: launcher: better empty text Also reload wallpapers when path changes --- utils/Paths.qml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'utils') diff --git a/utils/Paths.qml b/utils/Paths.qml index cc8c712..ac95e80 100644 --- a/utils/Paths.qml +++ b/utils/Paths.qml @@ -16,6 +16,14 @@ Singleton { readonly property url imagecache: `${cache}/imagecache` + function expandTilde(path: string): string { + return strip(path.replace("~", root.home.toString())); + } + + function shortenHome(path: string): string { + return path.replace(strip(root.home.toString()), "~"); + } + function strip(path: url): string { return path.toString().replace("file://", ""); } -- cgit v1.2.3-freya