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
|
||||||
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
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue