summaryrefslogtreecommitdiff
path: root/utils/Paths.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-19 20:18:04 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-19 20:18:04 +1000
commite4d2226dd0c84fa6e201f1c424cf5c3e0df24c0f (patch)
treef8190f776be6768f0d7e49e9e5d44659be33b566 /utils/Paths.qml
parentinternal: make wallpaper dir configurable (diff)
downloadcaelestia-shell-e4d2226dd0c84fa6e201f1c424cf5c3e0df24c0f.tar.gz
caelestia-shell-e4d2226dd0c84fa6e201f1c424cf5c3e0df24c0f.tar.bz2
caelestia-shell-e4d2226dd0c84fa6e201f1c424cf5c3e0df24c0f.zip
launcher: better empty text
Also reload wallpapers when path changes
Diffstat (limited to 'utils/Paths.qml')
-rw-r--r--utils/Paths.qml8
1 files changed, 8 insertions, 0 deletions
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://", "");
}