pragma ComponentBehavior: Bound import Quickshell import Quickshell.Hyprland import Quickshell.Io import QtQuick import Qt.labs.folderlistmodel 2.10 import qs import qs.settings Loader { active: Settings.config.wallswitchershown sourceComponent: root Component { id: root FloatingWindow { implicitWidth: 700 title: "qs-wallpicker" implicitHeight: 600 color: Colors.base00 visible: Settings.config.wallswitchershown onClosed: Settings.config.wallswitchershown = false Rectangle { id: container radius: Settings.config.rounding anchors { fill: parent margins: 8 } color: Colors.base02 FolderListModel { id: wpModel folder: "file:///home/lucy/.walls/" nameFilters: ["*.png"] } Component { id: wallDelegate Rectangle { id: wpPreview required property var filePath implicitWidth: 80 implicitHeight: 60 color: "transparent" Image { asynchronous: true anchors.fill: parent source: wpPreview.filePath ? wpPreview.filePath : null } MouseArea { id: updater acceptedButtons: Qt.LeftButton cursorShape: Qt.PointingHandCursor anchors.fill: parent onClicked: { Settings.config.currentWall = wpPreview.filePath; } } } } GridView { id: wallLayout anchors.centerIn: parent anchors.margins: 20 anchors.leftMargin: 40 anchors.fill: parent clip: true model: wpModel delegate: wallDelegate } } } } }