quickshell: add Background module

This allows me to set my background image using
Quickshell. No need for swww or any other wallpaper
daemon :D
This commit is contained in:
Bloxx12 2025-07-13 21:15:17 +02:00
commit d5dfa36b6d
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
2 changed files with 42 additions and 18 deletions

View file

@ -0,0 +1,28 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
PanelWindow {
id: root
exclusionMode: ExclusionMode.Ignore
WlrLayershell.layer: WlrLayer.Background
WlrLayershell.namespace: "shell:background"
anchors {
top: true
bottom: true
left: true
right: true
}
Item {
id: background
anchors.fill: parent
Image {
id: image
asynchronous: true
source: "../../../wholefoods.png"
}
}
}

View file

@ -2,16 +2,13 @@ pragma ComponentBehavior: Bound
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import Quickshell.Services.Notifications
import QtQuick import QtQuick
import QtQuick.Effects import QtQuick.Effects
import "../bar" import "../bar"
import "../volume"
import "../notifications"
import "../../services"
import "../../config" import "../../config"
import "../"
Variants { Variants {
model: Quickshell.screens model: Quickshell.screens
@ -49,10 +46,10 @@ Variants {
// Setting the intersection mode to Xor will invert the mask and make everything in the mask region not clickable and pass through clicks inside it through the window. // Setting the intersection mode to Xor will invert the mask and make everything in the mask region not clickable and pass through clicks inside it through the window.
intersection: Intersection.Xor intersection: Intersection.Xor
Region { // Region {
item: volume // item: volume
intersection: Intersection.Subtract // intersection: Intersection.Subtract
} // }
} }
anchors { anchors {
@ -88,17 +85,16 @@ Variants {
id: bar id: bar
screen: scope.modelData screen: scope.modelData
} }
}
BackgroundImage {
id: backgroundimage
screen: scope.modelData
}
BackgroundImage {
id: background_overview
screen: scope.modelData
// VolumeSlider { WlrLayershell.namespace: "shell:background-overview"
// id: volume
// screen: scope.modelData
// }
// Hover {
// id: hover
// screen: scope.modelData
// bar: bar
// }
} }
} }
} }