made wallpaper settable with xdg config

This commit is contained in:
Hannes
2026-06-08 23:53:18 +02:00
parent b2eadfe9a2
commit c37db71cac
9 changed files with 97 additions and 12 deletions
+21 -2
View File
@@ -3,14 +3,32 @@ import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../states/wallpaper" as Global
Item { // container, invisible
id: wlLoader
Process {
id: getWallpaper
command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/scripts/wallpaper_dir.sh"]
stdout: StdioCollector {
onStreamFinished: function() {
console.log("getWallpaper: " + this.text)
Global.WallpaperState.wallpaperDir = this.text.trim()
wlogoutLoader.active = true
}
}
}
Loader {
id: wlogoutLoader
active: false
sourceComponent: Wlogout { id: wLogout }
sourceComponent: Wlogout {
id: wLogout
}
}
GlobalShortcut {
@@ -19,7 +37,8 @@ Item { // container, invisible
onPressed: {
console.log("Pressed Meta+Shift+W (Hyprland global shortcut)")
wlogoutLoader.active = !wlogoutLoader.active
getWallpaper.running = true
// wlogoutLoader.active = !wlogoutLoader.active
}
}