Module lua.dbus_proxy.proxies.notifier
a class to send notification.
https://specifications.freedesktop.org/notification/1.3/protocol.html
Functions
| M.Notifier:new (notifier) | |
| M.Notifier:notify (app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout) | Sends a notification to the notification server. |
| M.Notifier:close (id) | Causes a notification to be forcefully closed and removed from the user's view. |
Functions
- M.Notifier:new (notifier)
-
Parameters:
- notifier table?
Returns:
-
table notifier
- M.Notifier:notify (app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout)
-
Sends a notification to the notification server.
Parameters:
- app_name string? The optional name of the application sending the notification. Can be blank.
- replaces_id integer The optional notification ID that this notification replaces. The server must atomically (ie with no flicker or other visual cues) replace the given notification with this one. This allows clients to effectively modify the notification while it's active. A value of value of 0 means that this notification won't replace any existing notifications.
- app_icon string? The optional program icon of the calling application. See Icons and Images. Can be an empty string, indicating no icon.
- summary string The summary text briefly describing the notification.
- body string? The optional detailed body text. Can be empty.
- actions string[] Actions are sent over as a list of pairs. Each even element in the list (starting at index 0) represents the identifier for the action. Each odd element in the list is the localized string that will be displayed to the user.
- hints
table
? Optional hints that can be passed to the server from the client program. Although clients and servers should never assume each other supports any specific hints, they can be used to pass along information, such as the process PID or window ID, that the server may be able to make use of. See Hints. Can be empty. - expire_timeout integer The timeout time in milliseconds since the display of the notification at which the notification should automatically close. If -1, the notification's expiration time is dependent on the notification server's settings, and may vary for the type of notification. If 0, never expire.
Returns:
-
integer id
- M.Notifier:close (id)
-
Causes a notification to be forcefully closed and removed from the user's
view. It can be used, for example, in the event that what the notification
pertains to is no longer relevant, or to cancel a notification with no
expiration time.
Parameters:
- id integer