dismissed: (id: number) notification removed from popupsnotified: (id: number) notification added to popups and notificationsclosed: (id: number) notification removed from popups and notificationspopupTimeout: number: milliseconds, 3000 by defaultforceTimeout: boolean: Force every notifications timeout to be
popupTimeout. false by default.cacheActions: boolean: Action buttons don't work if the sender process is
no longer running. So on reboot they won't work. false by defaultclearDelay: number: milliseconds to wait after each notification closed
when calling clear. This is to prevent crashes when its not handled by the
user.dnd: boolean: do no disturb, it will permit the notification to be added
to Notifications.popupspopups: Notification[]notifications: Notification[]clear: () => void: removes all notificationsgetNotification: (id: number) => NotificationgetPopup: (id: number) => Notificationdismissed notification.popup became falseclosedinvoked: (action: string)id: numberapp-name: stringapp-entry: string | null .desktop fileapp-icon: stringsummary: string titlebody: stringactions: Array<{ id: string, label: string }>urgency: "low" | "normal" | "critical"time: number you can GLib.DateTime.new_from_unix_local(time)image: string | null path to the imagepopup: boolean whether this should show as a popup bannerhints: Record<string, GLib.Variant>
notification hints,
these are not cached and this returns an empty object if loaded from cachedismiss () => void sets popup to falseclose () => voidinvoke (actionId: string) => void invoking an action will also close the
notificationconst notifications = await Service.import("notifications");
notifications.popupTimeout = 3000;
notifications.forceTimeout = false;
notifications.cacheActions = false;
notifications.clearDelay = 100;
Widget.Label({
label: notifications.bind("notifications").as((n) =>
`there are ${n.length} notifications`
),
});
(Image: notifs)