This commit is contained in:
Sakooooo 2024-08-04 21:53:38 +04:00
parent faa184cb3f
commit 03cf43c4f7
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -1,5 +1,5 @@
const hyprland = await Service.import("hyprland")
const notifications = await Service.import("notifications")
// const notifications = await Service.import("notifications")
const mpris = await Service.import("mpris")
const audio = await Service.import("audio")
const battery = await Service.import("battery")
@ -47,21 +47,21 @@ function Clock() {
// we don't need dunst or any other notification daemon
// because the Notifications module is a notification daemon itself
function Notification() {
const popups = notifications.bind("popups")
return Widget.Box({
class_name: "notification",
visible: popups.as(p => p.length > 0),
children: [
Widget.Icon({
icon: "preferences-system-notifications-symbolic",
}),
Widget.Label({
label: popups.as(p => p[0]?.summary || ""),
}),
],
})
}
// function Notification() {
// const popups = notifications.bind("popups")
// return Widget.Box({
// class_name: "notification",
// visible: popups.as(p => p.length > 0),
// children: [
// Widget.Icon({
// icon: "preferences-system-notifications-symbolic",
// }),
// Widget.Label({
// label: popups.as(p => p[0]?.summary || ""),
// }),
// ],
// })
// }
function Media() {
@ -172,7 +172,7 @@ function Center() {
spacing: 8,
children: [
Media(),
Notification(),
// Notification(),
],
})
}