working wallpaper switcher ui

This commit is contained in:
lucy 2025-12-22 17:57:54 +01:00
parent 37a134f077
commit e06de04203
2 changed files with 12 additions and 17 deletions

View File

@ -5,6 +5,8 @@ import "."
WlrLayershell {
id: root
property string wall: WallpaperStore.currentWall
onWallChanged: console.log("new wall!:" + wall)
// 1. Send it to the bottom of the stack!
layer: WlrLayer.Background
@ -27,20 +29,7 @@ WlrLayershell {
id: actualWall
anchors.fill: parent
source: WallpaperStore.currentWall
fillMode: Image.PreserveAspectCrop
Behavior on source {
NumberAnimation {
duration: 500
}
}
onSourceChanged: console.log("🖼️ Wallpaper noticed change! New source: " + source)
}
// Bonus: A dark rectangle to dim the wallpaper slightly?
Rectangle {
anchors.fill: parent
color: "black"
opacity: 0.2
onSourceChanged: console.log("🖼️ Wallpaper noticed change! New source: " + wall)
}
}

View File

@ -1,11 +1,17 @@
//@ pragma UseQApplication
import qs.modules.bar
import "./modules/bar/"
import Quickshell
import "./modules/wallpaper"
import "./modules/wallpaper/"
Scope {
WallSwitcher {}
Wallpaper {}
Variants {
id: wallVariants
model: Quickshell.screens
delegate: Wallpaper {
screen: modelData
}
}
Variants {
id: barVariants
model: Quickshell.screens