KDBusNotification – a DBUS notification service
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
Emanoil Kotsev cbbef4ff57
Add support for resident notifications hint
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
1 month ago
src Add support for resident notifications hint 1 month ago
translations Update translation files 9 months ago
CMakeL10n.txt Use centralized cmake version 2 years ago
CMakeLists.txt Replace gdbus and GTK with dbus-1-tqt and TDE native notifications 9 months ago
ConfigureChecks.cmake Code adjustments after revew 9 months ago
INSTALL Replace gdbus and GTK with dbus-1-tqt and TDE native notifications 9 months ago
README.md removed README and updated README.md 2 months ago
config.h.cmake Rename __KDE_HAVE_GCC_VISIBILITY to __TDE_HAVE_GCC_VISIBILITY 2 years ago

README.md

kdbusnotification - a DBUS notification service for TDE.

Kdbusnotification is a small program for the Trinity Desktop that displays DBUS notifications via passive popups.

.

Contributing

If you wish to contribute to Kdbusnotification (TDE), you might do so:

Translations status

messages

Translations status

desktop files

Translations status

kdbusnotification - a DBUS notification service for TDE.

Kdbusnotification is a small program for the Trinity Desktop that displays DBUS notifications via passive popups.

Documentation

https://specifications.freedesktop.org/notification/latest/index.html

Testing

To test the implementation use following(source):

Arguments: application name = identifier id - if 0 or not existing will create new notification, otherwise icon - local path if provided - the text is not displayed title desctiotion actions hints expire time (milisec) - if -1 server default (5sec), if 0 - no expiration

gdbus call \
    --session \
    --dest org.freedesktop.Notifications \
    --object-path /org/freedesktop/Notifications \
    --method org.freedesktop.Notifications.Notify \
    "identifier" \
    "0" \
    "" \
    "Notification title" \
    "Notification description" \
    "[]" \
    "{}" \
    "2000"

In d-feet "identifier", 0, "", "Notification title", "Notification description", [], {}, 30000

Arguments Table 1: Notification Components #:

    --session       to use the session bus
    --dest          interface to use
    --object-path   the object path of the interface
    --method        the method to call

Method arguments:

ComponentDescription
Application Name This is the optional name of the application sending the notification. This should be the application's formal name, rather than some sort of ID. An example would be "FredApp E-Mail Client," rather than "fredapp-email-client."
Replaces ID An optional ID of an existing notification that this notification is intended to replace.
Notification Icon The notification icon. See Icons and Images Formats.
Summary This is a single line overview of the notification. For instance, "You have mail" or "A friend has come online". It should generally not be longer than 40 characters, though this is not a requirement, and server implementations should word wrap if necessary. The summary must be encoded using UTF-8.
Body

This is a multi-line body of text. Each line is a paragraph, server implementations are free to word wrap them as they see fit.

The body may contain simple markup as specified in Markup. It must be encoded using UTF-8.

If the body is omitted, just the summary is displayed.

Actions

The actions send a request message back to the notification client when invoked. This functionality may not be implemented by the notification server, conforming clients should check if it is available before using it (see the GetCapabilities message in Protocol). An implementation is free to ignore any requested by the client. As an example one possible rendering of actions would be as buttons in the notification popup.

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.

The default action (usually invoked by clicking the notification) should have a key named "default". The name can be anything, though implementations are free not to display it.

Hints

Hints are a way to provide extra data to a notification server that the server may be able to make use of.

See Hints for a list of available hints.

Expiration Timeout

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, the notification never expires.

Once this command is executed, the system returns a response: (uint32 13,)

This number, here 13, is the id of the notification that we will be able to replace.

This means that the following command will not create a new notification, but will replace the one we just created:

gdbus call \
    --session \
    --dest org.freedesktop.Notifications \
    --object-path /org/freedesktop/Notifications \
    --method org.freedesktop.Notifications.Notify \
    "identifier" \
    "13" \
    "" \
    "My updated title" \
    "My updated description" \
    "[]" \
    "{}" \
    "2000"

Example to test formatted text (hypertext):

gdbus call \
    --session \
    --dest org.freedesktop.Notifications \
    --object-path /org/freedesktop/Notifications \
    --method org.freedesktop.Notifications.Notify \
    "<b>Identifier</b>" \
    "5" \
    "/usr/share/icons/hicolor/72x72/mimetypes/virtualbox-vbox.png" \
    "<b>Notification title</b>" \
    "<b>Notification:</b><br/>Some Text here" \
    "[]" \
    "{}" \
    "2000"