import Quickshell // for PanelWindow import QtQuick // for Text import QtQuick.Controls import QtQuick.Layouts import Quickshell.Io import Quickshell.Widgets import Quickshell.Hyprland import Quickshell.Services.Pipewire Flickable { //anchors.fill: parent required property list hyprcmds id: root property string dir: "/home/nathan/Pictures/Wallpaper/" implicitHeight: lay.height implicitWidth: 750 interactive: true contentWidth: lay.width flickDeceleration: 5000 contentX: 100 WheelHandler { target: root //property: "contentX" onWheel: { console.log("test") } } Process { id: ls //command: ["find", root.dir + "*"] command: ["ls", dir] running: true stdout: StdioCollector { onStreamFinished: { rep.model = text.split("\n").filter((s) => { return s != ""; }) } } } RowLayout { id: lay Repeater { id: rep model: 0 WrapperMouseArea { onWheel: (e) => { root.flick(e.angleDelta.y * 15, 0) } ClippingWrapperRectangle { radius: 10 implicitWidth: 192 * 2; implicitHeight: 108 * 2 Image { width: 192 * 2; height: 108 * 2 source: Qt.resolvedUrl(root.dir + rep.model[index]) fillMode: Image.PreserveAspectCrop sourceSize.width: 192 * 2 sourceSize.height: 108 * 2 } } property Process sw: Process { command: ["setWallpaper", root.dir + rep.model[index]] running: false onRunningChanged: { root.hyprcmds.forEach((c) => Hyprland.dispatch(c)) } } onClicked: { sw.running = true } } } } }