import { Astal, Gtk } from "ags/gtk4"; import { createBinding, For } from "ags"; import { Notifications } from "../scripts/notifications"; import { NotificationWidget } from "../widget/Notification"; import AstalNotifd from "gi://AstalNotifd?version=0.1"; import Adw from "gi://Adw?version=1"; const size = 450; export const FloatingNotifications = (mon: number) => {(notif: AstalNotifd.Notification) => {/* Why is holdOnHover disabled: the shell for some reason crashes when removing the notification on hover-lost 💔 */} Notifications.getDefault().removeNotification(notif)} holdOnHover={false} actionClicked={() => { const viewAction = notif.actions.filter(action => action.label.toLowerCase() === "view")?.[0]; viewAction && notif.invoke(viewAction.id); }} /> } as Astal.Window;