49 lines
1.3 KiB
QML
49 lines
1.3 KiB
QML
|
|
//@ pragma UseQApplication
|
||
|
|
import Quickshell
|
||
|
|
import Quickshell.Hyprland
|
||
|
|
import Quickshell.Services.Notifications
|
||
|
|
import QtQuick
|
||
|
|
|
||
|
|
ShellRoot {
|
||
|
|
id: root
|
||
|
|
|
||
|
|
Base { id: base }
|
||
|
|
|
||
|
|
NotificationServer {
|
||
|
|
id: notifServer
|
||
|
|
keepOnReload: true
|
||
|
|
bodySupported: true
|
||
|
|
bodyMarkupSupported: true
|
||
|
|
actionsSupported: true
|
||
|
|
persistenceSupported: true
|
||
|
|
|
||
|
|
onNotification: notification => {
|
||
|
|
notification.tracked = true
|
||
|
|
root.latestNotification = notification
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
property var notifServerRef: notifServer
|
||
|
|
property var latestNotification: null
|
||
|
|
property int notifCount: notifServer.trackedNotifications.values.length
|
||
|
|
|
||
|
|
Variants {
|
||
|
|
model: Quickshell.screens
|
||
|
|
delegate: Component {
|
||
|
|
Scope {
|
||
|
|
property var modelData
|
||
|
|
Bar {
|
||
|
|
screen: modelData
|
||
|
|
walColors: base.walColors
|
||
|
|
motd: base.motd
|
||
|
|
notificationCount: root.notifCount
|
||
|
|
latestNotification: root.latestNotification
|
||
|
|
notifServer: root.notifServerRef
|
||
|
|
stats: base.stats
|
||
|
|
fontFamily: base.fontFamily
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|