noctalia-shell/Modules/Background/Background.qml
LemmyCook 861e207fb6 Wip!
2025-08-29 09:55:47 -04:00

42 lines
876 B
QML

import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Commons
import qs.Services
Variants {
model: Quickshell.screens
delegate: Loader {
required property ShellScreen modelData
property string wallpaperSource: WallpaperService.getWallpaper(modelData.name)
active: wallpaperSource !== ""
sourceComponent: PanelWindow {
color: Color.transparent
screen: modelData
WlrLayershell.layer: WlrLayer.Background
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.namespace: "quickshell-wallpaper"
anchors {
bottom: true
top: true
right: true
left: true
}
Image {
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
source: wallpaperSource
cache: true
smooth: true
mipmap: false
}
}
}
}