diff options
| -rw-r--r-- | modules/launcher/ContentList.qml | 2 | ||||
| -rw-r--r-- | services/Wallpapers.qml | 6 | ||||
| -rw-r--r-- | utils/Paths.qml | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/modules/launcher/ContentList.qml b/modules/launcher/ContentList.qml index 2eaa515..41f6a6a 100644 --- a/modules/launcher/ContentList.qml +++ b/modules/launcher/ContentList.qml @@ -137,7 +137,7 @@ Item { } StyledText { - text: root.state === "wallpapers" && Wallpapers.list.length === 0 ? qsTr("Try putting some wallpapers in %1").arg(Paths.shortenHome(Config.paths.wallpaperDir)) : qsTr("Try searching for something else") + text: root.state === "wallpapers" && Wallpapers.list.length === 0 ? qsTr("Try putting some wallpapers in %1").arg(Paths.shortenHome(Paths.wallsdir)) : qsTr("Try searching for something else") color: Colours.palette.m3onSurfaceVariant font.pointSize: Appearance.font.size.normal } diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml index 7cfe7cb..30d7b0e 100644 --- a/services/Wallpapers.qml +++ b/services/Wallpapers.qml @@ -87,7 +87,7 @@ Searcher { id: getWallsProc running: true - command: ["find", "-L", Paths.expandTilde(Config.paths.wallpaperDir), "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"] + command: ["find", "-L", Paths.expandTilde(Paths.wallsdir), "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"] stdout: StdioCollector { onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => Images.isValidImageByName(w)).sort() } @@ -97,7 +97,7 @@ Searcher { id: watchWallsProc running: true - command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Paths.expandTilde(Config.paths.wallpaperDir)] + command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Paths.expandTilde(Paths.wallsdir)] stdout: SplitParser { onRead: data => { if (Images.isValidImageByName(data)) @@ -125,6 +125,6 @@ Searcher { component Wallpaper: QtObject { required property string modelData readonly property string path: modelData - readonly property string name: path.slice(Paths.expandTilde(Config.paths.wallpaperDir).length + 1, path.lastIndexOf(".")) + readonly property string name: path.slice(Paths.expandTilde(Paths.wallsdir).length + 1, path.lastIndexOf(".")) } } diff --git a/utils/Paths.qml b/utils/Paths.qml index 0a00c9d..6000486 100644 --- a/utils/Paths.qml +++ b/utils/Paths.qml @@ -1,5 +1,6 @@ pragma Singleton +import qs.config import Quickshell import Qt.labs.platform @@ -15,6 +16,7 @@ Singleton { readonly property url config: `${StandardPaths.standardLocations(StandardPaths.GenericConfigLocation)[0]}/caelestia` readonly property url imagecache: `${cache}/imagecache` + readonly property string wallsdir: Quickshell.env("CAELESTIA_WALLPAPERS_DIR") || Config.paths.wallpaperDir readonly property string libdir: Quickshell.env("CAELESTIA_LIB_DIR") || "/usr/lib/caelestia" function stringify(path: url): string { |