Notifications
signals
dismissed
:(id: number)
notification removed from popupsnotified
:(id: number)
notification added to popups and notificationsclosed
:(id: number)
notification removed from popups and notifications
properties
popupTimeout
:number
: milliseconds, 3000 by defaultforceTimeout
:boolean
: Force every notifications timeout to bepopupTimeout
. 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 callingclear
. 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[]
methods
clear
:() => void
: removes all notificationsgetNotification
:(id: number) => Notification
getPopup
:(id: number) => Notification
Notification
signals
dismissed
notification.popup became falseclosed
invoked
:(action: string)
properties
id
:number
app-name
:string
app-entry
:string | null
.desktop fileapp-icon
:string
summary
:string
titlebody
:string
actions
:Array<{ id: string, label: string }>
urgency
:"low" | "normal" | "critical"
time
:number
you canGLib.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 cache
methods
dismiss
() => void
sets popup to falseclose
() => void
invoke
(actionId: string) => void
invoking an action will also close the notification