Last active
February 6, 2024 10:18
-
-
Save lduboeuf/6c4b1177d0984297ed6818c2521f78b8 to your computer and use it in GitHub Desktop.
Test UT push notif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
monitor Notifs: | |
dbus-monitor interface=org.freedesktop.Notifications | |
gdbus call --session --dest com.ubuntu.Postal --object-path /com/ubuntu/Postal/dekko2_2edekkoproject --method com.ubuntu.Postal.Post dekko2.dekkoproject_dekko \ | |
'"{\"message\": \"foobar\", \"notification\":{\"card\": {\"summary\": \"yes\", \"body\": \"hello\", \"popup\": true, \"persist\": true}}}"' | |
Avec son: | |
gdbus call --session --dest com.ubuntu.Postal --object-path /com/ubuntu/Postal/dekko2_2edekkoproject --method com.ubuntu.Postal.Post dekko2.dekkoproject_dekko \ | |
'"{\"message\": \"foobar\", \"notification\":{\"sound\": \"test.ogg\",\"card\": {\"summary\": \"yes\", \"body\": \"hello\", \"popup\": true, \"persist\": true}}}"' | |
DEBUG push client: | |
/etc/xdg/ubuntu-push-client/config.json -> log level = debug | |
kill the process, it is auto relaunched | |
Notif simple: | |
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "notify-send" 1 "back" "hi mom3" "blah blah blah" "[]" '{}' 5000 | |
persistent notif: | |
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "notify-send" 3 "security-alert" "hi mom3" "blah blah blah" "[]" '{"urgency": <2>}' 5000 | |
notif avec secondary icon | |
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "notify-send" 1 "message" "hi mom3" "blah blah blah" "[]" '{"x-lomiri-secondary-icon": <string "incoming-call">}' 5000 |
with sound:
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "notify-send" 1 "file:///opt/click.ubuntu.com/dekko2.dekkoproject/current/dekko.png" "hi mom3" "blah blah blah" "[]" '{"x-lomiri-secondary-icon": <string "file:///opt/click.ubuntu.com/teleports.ubports/current/assets/icon.svg">, "sound-file": <string "file:///usr/share/sounds/ubports/notifications/Sintonia.ogg">}' 5000
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
notif with buttons:
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "notify-send" 0 "security-alert" "hi critical3" "blah blah blah" "['ok', 'OK', 'cancel', 'Annuler']" '{"x-lomiri-snap-decisions": <string "true">, "x-lomiri-snap-decisions-timeout": <2147483647>}' 0