Files
quickshell/modules/wp/WallpaperPickerLoader.qml
T
2026-06-14 00:49:24 +02:00

40 lines
932 B
QML

import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../config"
Item {
id: wLoader
Process {
id: generateThumbs
command: ["sh", "-c", Config.configDir + "/modules/wp/generate-wallpaper-thumbs.sh"]
stdout: StdioCollector {
onStreamFinished: console.log(this.text)
}
}
Loader {
id: wallpaperLoader
active: false
sourceComponent: WallpaperPicker { id: wPicker }
}
GlobalShortcut {
name: "Wallpaper"
description: "Open wallpaper picker"
onPressed: {
// generateThumbs.startDetached()
generateThumbs.running = true
console.log("Pressed Meta+Shift+W (Hyprland global shortcut)")
wallpaperLoader.active = !wallpaperLoader.active
}
}
function closeWallpaperPicker() {
wallpaperLoader.active = false
}
}