pragma Singleton import qs.config import qs.utils import Caelestia.Models import Quickshell import Quickshell.Io import QtQuick Searcher { id: root readonly property list smartArg: Config.services.smartScheme ? [] : ["--no-smart"] property bool showPreview: false readonly property string current: Paths.wallpaper function setWallpaper(path: string): void { actualCurrent = path; Quickshell.execDetached(["caelestia", "wallpaper", "-f", path, ...smartArg]); } list: wallpapers.entries key: "relativePath" useFuzzy: Config.launcher.useFuzzy.wallpapers extraOpts: useFuzzy ? ({}) : ({ forward: false }) IpcHandler { target: "wallpaper" function get(): string { return root.actualCurrent; } function set(path: string): void { root.setWallpaper(path); } function list(): string { return root.list.map(w => w.path).join("\n"); } } }