Added Thumbnailing to wallpaper picker

This commit is contained in:
Hannes
2026-02-12 21:09:56 +01:00
parent 19f74f2865
commit 5d2784ecb4
4 changed files with 98 additions and 14 deletions
+2 -3
View File
@@ -5,7 +5,6 @@ import Quickshell.Hyprland
import Quickshell.Io
import Qt.labs.folderlistmodel
PanelWindow {
id: picker
implicitWidth: screen.width * 0.75
@@ -41,7 +40,7 @@ PanelWindow {
// get folder url
FolderListModel {
id: imagesModel
folder: "file://" + Quickshell.workingDirectory + "/Pictures/Wallpapers"
folder: "file://" + Quickshell.env("HOME") + "/.cache/wallpaper-thumbs"
nameFilters: ["*.png", "*.jpg", "*.jpeg"]
showDirs: false
}
@@ -103,7 +102,7 @@ PanelWindow {
anchors.fill: parent
Process {
id: wallpaperProcess
command: ["sh", "-c", Quickshell.workingDirectory + "/.config/quickshell/modules/wp/set-wallpaper.sh" + " " + model.filePath + " &"]
command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/modules/wp/set-wallpaper.sh" + " " + model.filePath + " &"]
stdout: StdioCollector {
onStreamFinished: console.log(`line read: ${this.text}`)
}