summaryrefslogtreecommitdiffstats
path: root/home-configuration/config/quickshell/modules/desktop/Wallpaper.qml
diff options
context:
space:
mode:
authorcoast <coasteen@proton.me>2026-09-07 07:07:22 +0330
committercoast <coasteen@proton.me>2026-09-07 07:07:22 +0330
commit7922ded35ff292e485c3369dab9726b9142ce526 (patch)
treeea47cb7bb569b5fb8c44ede3357f1a8b4b41722c /home-configuration/config/quickshell/modules/desktop/Wallpaper.qml
parenta7cdf9580a901ed65f179417f6ed8a0848491b66 (diff)
downloadnix-7922ded35ff292e485c3369dab9726b9142ce526.tar.gz
nix-7922ded35ff292e485c3369dab9726b9142ce526.tar.bz2
nix-7922ded35ff292e485c3369dab9726b9142ce526.tar.xz
nix-7922ded35ff292e485c3369dab9726b9142ce526.tar.zst
a lot of quickshell
Diffstat (limited to 'home-configuration/config/quickshell/modules/desktop/Wallpaper.qml')
-rw-r--r--home-configuration/config/quickshell/modules/desktop/Wallpaper.qml63
1 files changed, 63 insertions, 0 deletions
diff --git a/home-configuration/config/quickshell/modules/desktop/Wallpaper.qml b/home-configuration/config/quickshell/modules/desktop/Wallpaper.qml
new file mode 100644
index 0000000..557fef9
--- /dev/null
+++ b/home-configuration/config/quickshell/modules/desktop/Wallpaper.qml
@@ -0,0 +1,63 @@
+import QtQuick
+import QtQuick.Effects
+import Quickshell
+import Quickshell.Wayland
+import "../../config.js" as Config
+
+Variants {
+ model: Quickshell.screens
+
+ PanelWindow {
+ required property var modelData
+
+ property var wallpaper: Config.wallpapers.find(function(w) {
+ return w.outputs.indexOf(modelData.name) !== -1
+ })
+
+ screen: modelData
+ visible: wallpaper !== undefined
+
+ anchors {
+ top: true
+ bottom: true
+ left: true
+ right: true
+ }
+
+ exclusionMode: ExclusionMode.Ignore
+
+ WlrLayershell.layer: WlrLayer.Background
+ WlrLayershell.namespace: "wallpaper"
+
+ Image {
+ id: wallpaperImage
+
+ anchors.fill: parent
+
+ source: wallpaper ? wallpaper.path : ""
+
+ fillMode: wallpaper
+ ? Image[wallpaper.fillMode]
+ : Image.PreserveAspectCrop
+
+ opacity: wallpaper ? wallpaper.opacity : 1.0
+
+ asynchronous: wallpaper
+ ? wallpaper.asynchronous
+ : true
+
+ cache: wallpaper
+ ? wallpaper.cache
+ : true
+ }
+
+ MultiEffect {
+ anchors.fill: wallpaperImage
+
+ source: wallpaperImage
+
+ blurEnabled: wallpaper ? wallpaper.blur > 0 : false
+ blur: wallpaper ? wallpaper.blur : 0
+ }
+ }
+}