From 3a67bc52041359fed025ee7334d15a63c91a4660 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Wed, 17 Sep 2025 17:39:03 -0400 Subject: [PATCH 1/2] alias data --- components/StyledPanelWindow.qml | 2 +- modules/powermenu/PowerMenu.qml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/StyledPanelWindow.qml b/components/StyledPanelWindow.qml index 7a730c6..ebadb64 100644 --- a/components/StyledPanelWindow.qml +++ b/components/StyledPanelWindow.qml @@ -7,7 +7,7 @@ import Quickshell.Wayland PanelWindow { id: window - default property alias content: contentItem.children + default property alias content: contentItem.data property alias background: background required property string name property bool canFocus: true diff --git a/modules/powermenu/PowerMenu.qml b/modules/powermenu/PowerMenu.qml index ad87ea3..e784007 100644 --- a/modules/powermenu/PowerMenu.qml +++ b/modules/powermenu/PowerMenu.qml @@ -20,15 +20,15 @@ StyledPanelWindow { Visibility.powermenu = focused; } + Process { + id: process + } + WrapperItem { id: rect margin: 14 - Process { - id: process - } - StyledListView { id: list From 450ff7a50316156b224348195b49e562bc980bcf Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Thu, 18 Sep 2025 08:37:56 -0400 Subject: [PATCH 2/2] wallpapers WIP --- modules/configuration/Configuration.qml | 6 ++++++ modules/configuration/Wallpaper.qml | 13 +++++++++++++ services/WallpaperService.qml | 24 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 modules/configuration/Wallpaper.qml create mode 100644 services/WallpaperService.qml diff --git a/modules/configuration/Configuration.qml b/modules/configuration/Configuration.qml index 5122033..749b195 100644 --- a/modules/configuration/Configuration.qml +++ b/modules/configuration/Configuration.qml @@ -112,6 +112,12 @@ StyledPanelWindow { title: "Styling" view: StylingView {} } + + ConfigurationView { + icon: Styling.lucide.icons.swatchBook + title: "Wallpapers" + view: Wallpaper {} + } } component ConfigurationView: QtObject { diff --git a/modules/configuration/Wallpaper.qml b/modules/configuration/Wallpaper.qml new file mode 100644 index 0000000..d75a04a --- /dev/null +++ b/modules/configuration/Wallpaper.qml @@ -0,0 +1,13 @@ +import qs.services +import QtQuick +import QtQuick.Layouts + +ColumnLayout { + Repeater { + model: WallpaperService.files + delegate: Text { + required property string dataModel + text: dataModel + } + } +} diff --git a/services/WallpaperService.qml b/services/WallpaperService.qml new file mode 100644 index 0000000..2c0026f --- /dev/null +++ b/services/WallpaperService.qml @@ -0,0 +1,24 @@ +pragma Singleton + +import Quickshell +import Quickshell.Io + +Singleton { + id: root + + property string directory: "~/Wallpapers/" + property list files: [] + property list fileTypes: ["jpg", "jpeg", "png"] + + Process { + running: true + command: ["bash", "-c", `find "$dir" -maxdepth 1 -type f & inotifywait -m -r ${root.directory} -e modify,move,create,delete | while read dir action; do find "$dir" -maxdepth 1 -type f; done`] + stderr: StdioCollector { + onStreamFinished: console.log(`line read: ${this.text}`) + } + stdout: SplitParser { + splitMarker: "\n" + onRead: data => root.files = data?.split("\n") ?? [] + } + } +}