Files
quickshell/modules/wp/WallpaperPickerLoader.qml
T

39 lines
960 B
QML

import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
Item { // container, invisible
id: wLoader
Process {
id: generateThumbs
command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/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
wallpaperLoader.active = !wallpaperLoader.active
console.log("Pressed Meta+Shift+W (Hyprland global shortcut)")
}
}
function closeWallpaperPicker() {
wallpaperLoader.active = false
}
}