This commit is contained in:
Bloxx12 2025-06-24 07:46:51 +02:00
commit 1a27b905bf
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
16 changed files with 622 additions and 177 deletions

View file

@ -0,0 +1,3 @@
import QtQuick
import QtQuick.Shapes

View file

@ -0,0 +1,54 @@
import Quickshell
import QtQuick
import QtQuick.Effects
import "../../config"
Item {
id: root
required property Rectangle bar
anchors.fill: parent
Rectangle {
id: rect
anchors.fill: parent
color: Config.border.color
visible: false
Behavior on color {
ColorAnimation {
duration: 150
easing.type: Easing.BezierSpline
}
}
}
Item {
id: mask
anchors.fill: parent
layer.enabled: true
visible: false
Rectangle {
anchors.fill: parent
anchors.margins: Config.border.thickness
anchors.leftMargin: root.bar.implicitWidth
radius: Config.border.rounding
}
}
MultiEffect {
anchors.fill: parent
maskEnabled: true
maskInverted: true
maskSource: mask
source: rect
maskThresholdMin: 0.5
maskSpreadAtMin: 1
}
}

117
modules/drawers/Drawers.qml Normal file
View file

@ -0,0 +1,117 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Notifications
import QtQuick
import QtQuick.Effects
import "../bar"
import "../notifications"
// import "../../services"
Variants {
model: Quickshell.screens
Scope {
id: scope
required property ShellScreen modelData
Exclusions {
screen: scope.modelData
bar: bar
}
PanelWindow {
id: win
screen: scope.modelData
color: "transparent"
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
// Clickthrough mask.
// Clickable areas of the window are determined by the provided region.
mask: Region {
x: bar.implicitWidth
y: 8
width: win.width - bar.implicitWidth
height: win.height - 8
// 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
}
anchors {
top: true
bottom: true
left: true
right: true
}
Item {
id: background
anchors.fill: parent
visible: false
Border {
bar: bar
}
}
MultiEffect {
anchors.fill: source
source: background
shadowEnabled: true
blurMax: 15
}
Bar {
id: bar
screen: scope.modelData
}
Item {
id: notifs
readonly property list<Notif> list: []
readonly property list<Notif> popups: list.filter(n => n.popup)
NotificationServer {
id: server
keepOnReload: false
onNotification: notif => {
notif.tracked = true;
console.log("Got notification: " + notif.body);
root.list.push(notifComp.createObject(root, {
popup: true,
notification: notif,
body: notif.body,
appName: notif.appName
}));
}
}
Component {
id: notifComp
Notif {}
}
}
}
}
component Notif: QtObject {
property bool popup
readonly property date time: new Date()
required property Notification notification
readonly property string body: notification.body
readonly property string appName: notification.appName
}
}

View file

@ -0,0 +1,38 @@
pragma ComponentBehavior: Bound
import Quickshell
import QtQuick
import "../../config"
Scope {
id: root
required property ShellScreen screen
required property Item bar
ExclusionZone {
anchors.left: true
exclusiveZone: root.bar.implicitWidth
}
ExclusionZone {
anchors.top: true
}
ExclusionZone {
anchors.right: true
}
ExclusionZone {
anchors.bottom: true
}
component ExclusionZone: PanelWindow {
screen: root.screen
color: "transparent"
exclusiveZone: Config.border.thickness
implicitHeight: Config.border.thickness
implicitWidth: Config.border.thickness
mask: Region {}
}
}