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:
parent
a2e77e2498
commit
d5dfa36b6d
2 changed files with 42 additions and 18 deletions
28
modules/style/quickshell/shell/modules/BackgroundImage.qml
Normal file
28
modules/style/quickshell/shell/modules/BackgroundImage.qml
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,16 +2,13 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
|
||||
import "../bar"
|
||||
import "../volume"
|
||||
import "../notifications"
|
||||
|
||||
import "../../services"
|
||||
import "../../config"
|
||||
import "../"
|
||||
|
||||
Variants {
|
||||
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.
|
||||
intersection: Intersection.Xor
|
||||
Region {
|
||||
item: volume
|
||||
intersection: Intersection.Subtract
|
||||
}
|
||||
// Region {
|
||||
// item: volume
|
||||
// intersection: Intersection.Subtract
|
||||
// }
|
||||
}
|
||||
|
||||
anchors {
|
||||
|
@ -88,17 +85,16 @@ Variants {
|
|||
id: bar
|
||||
screen: scope.modelData
|
||||
}
|
||||
}
|
||||
BackgroundImage {
|
||||
id: backgroundimage
|
||||
screen: scope.modelData
|
||||
}
|
||||
BackgroundImage {
|
||||
id: background_overview
|
||||
screen: scope.modelData
|
||||
|
||||
// VolumeSlider {
|
||||
// id: volume
|
||||
// screen: scope.modelData
|
||||
// }
|
||||
|
||||
// Hover {
|
||||
// id: hover
|
||||
// screen: scope.modelData
|
||||
// bar: bar
|
||||
// }
|
||||
WlrLayershell.namespace: "shell:background-overview"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue