diff options
Diffstat (limited to 'home-configuration/config/quickshell/modules/desktop/Wallpaper.qml')
| -rw-r--r-- | home-configuration/config/quickshell/modules/desktop/Wallpaper.qml | 63 |
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 + } + } +} |
