diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-19 20:18:04 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-19 20:18:04 +1000 |
| commit | e4d2226dd0c84fa6e201f1c424cf5c3e0df24c0f (patch) | |
| tree | f8190f776be6768f0d7e49e9e5d44659be33b566 /utils | |
| parent | internal: make wallpaper dir configurable (diff) | |
| download | caelestia-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')
| -rw-r--r-- | utils/Paths.qml | 8 |
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://", ""); } |