1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
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:
- TDE Gitea Workspace (TGW) collaboration tool.
https://mirror.git.trinitydesktop.org/gitea
- TDE Weblate Translation Workspace (TWTW) collaboration tool.
https://mirror.git.trinitydesktop.org/weblate
DOCUMENTATION
===============
https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html
https://sylvaindurand.org/update-notifications-with-libnotify/
To test the implementation use following:
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
The second identifier (here 1) concerns the id of the notification we wish to replace,
we will come back to this shortly.
The next identifier allows you to define an icon.
"[]" allows you to define actions, "{}" to define hints,
and finally the last argument 2000 presents the time during which the notification
must remain visible (in milliseconds).
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"
To test 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"
|